SteemTools v0.0.6 - Check Who Downvoted You + API Server Ping

in #utopian-io6 years ago (edited)

SteemTools

SteemTools is inspired by its sister project: Utopian Moderators & Supervisors and it provides a set of useful data, tools, statistics for SteemIt Users.

Github

https://github.com/DoctorLai/SteemTools/

Previous Contributions

Technology Stack

Javascript that runs in the Chrome Browser (Chrome Extension)

Chrome Webstore

It is online, and you can install SteemTools via:
https://chrome.google.com/webstore/detail/steem-tools/emjfpeecopppojbhkigjjmcahbfahhbn

If you are using Firefox, you can still install this Extension by Chrome Extension Foxified

New Features of v0.0.6

Along with bug fixes, code refactoring, this version has the following new features.

  1. Tab Downvoters so you can see who downvoted you in the past year.
  2. API Server Ping Tests

Commits

Here

Screenshots

API Server Ping Tests
image.png

Check who downvoted you in the past 365 days.
image.png

Some code in the Commit

The following connects to API server and gets a list of downvoters.

    // check who downvoted you
    // search a id when press Enter
    textPressEnterButtonClick($('input#downvoters_id'), $('button#downvote_btn'));
    $('button#downvote_btn').click(function() {        
        let id = prepareId($('input#downvoters_id').val());
        let server = getServer();        
        server = server || default_server;
        $('div#downvoters_div').html('<img src="images/loading.gif"/>');
        if (validId(id)) {
            // disable the button while API is not finished yet.
            $('button#downvote_btn').attr("disabled", true);
            $.ajax({ 
                dataType: "json",
                url: "https://" + server + "/api/steemit/downvote/?cached&id="+id,
                cache: false,
                success: function (response) {
                    let result = response;
                    if (result && result.length > 0) {
                        let s = '<h4><B>' + result.length + '</B> downvotes in the past year.</h4>';
                        s += '<table id="downvote_list" class="sortable">';
                        s += '<thead><tr><th>Down-Voter</th><th>Permlink</th><th>Weight %</th><th>Time</th></tr></thead><tbody>';
                        let total = 0;
                        for (let i = 0; i < result.length; ++ i) {
                            s += '<tr>';
                            total += result[i]['weight'] / 100;
                            s += '<td>' + getSteemUrl(result[i]['voter']) + '<BR/><img style="width:75px;height:75px" src="https://steemitboard.com/@' + result[i]['voter'] + '/level.png"></td>';
                            s += '<td>' + '<a target=_blank rel=nofollow href="https://steemit.com/@' + id + '/' + result[i]['permlink'] + '">' + result[i]['permlink'] + '</a></td>';
                            s += '<td>' + (result[i]['weight']/100).toFixed(2) + '</td>';
                            s += '<td>' + result[i]['time'] + '</td>';
                            s += '</tr>';
                        }              
                        s += '<tfoot><tr>';
                        s += '<th>Total: </th><th></th><th></th><th>' + total.toFixed(2) + '</th><th></th>'; 
                        s += '</tr></tfoot>';
                        s += '</table>';                 
                        $('div#downvoters_div').html(s);
                        sorttable.makeSortable(document.getElementById("downvote_list"));
                    } else {
                        $('div#downvoters_div').html("<font color=blue>It could be any of these: (1) No Deleted Comments (2) Invalid ID (3) API or SteemSQL server failed. Contact <a rel=nofollow target=_blank href='https://steemit.com/@justyy/'>@justyy</a> if you are not sure. Thanks!</font>");
                    }          
                },
                error: function(request, status, error) {
                    $('div#downvoters_div').html('<font color=red>API/SteemSQL Server (' + server + error + ') is currently offline. Please try again later!' + request.responseText + '</font>');
                },          
                complete: function(data) {
                    // re-enable the button
                    $('button#downvote_btn').attr("disabled", false);
                }
            });
        } else {
            alert('Not a Valid Steem ID.');
            $('div#downvoters_div').html('');
        }        
    });  

Roadmap of Steem Tools

  1. UI Language Setting
  2. Add Downvote Checker
  3. Add Delegator/Delegatee List Checker
  4. Steemit Top 100 Delegations
  5. SteemIt Followers/Votes Checker
  6. Steemit Incoming Votes Report
  7. Steemit Payout Report
  8. Steemit Outgoing Votes Report
  9. Steemit Who Resteem Your Posts?
  10. Steemit Recover Deleted Posts/Comments
  11. Steemit Powerdown Status
  12. and more...

License

MIT

Contribution Welcome

Github: https://github.com/DoctorLai/SteemTools/

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request.

Chrome Webstore

Install the SteemTools Chrome Extension Now!



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

@justyy, Contribution to open source project, I like you and upvote.

Thank you for the contribution. It has been approved.

You can contact us on Discord.
[utopian-moderator]

Hey @justyy I am @utopian-io. I have just upvoted you!

Achievements

  • WOW WOW WOW People loved what you did here. GREAT JOB!
  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

Coin Marketplace

STEEM 0.20
TRX 0.13
JST 0.030
BTC 63974.07
ETH 3426.40
USDT 1.00
SBD 2.54