"Hide ReSteems" just Released... a new and simple TamperMonkey Script Toggles Feed & Profile ReSteems!

in #steemit7 years ago (edited)

One of the most frequent complaints I hear about the STEEMIT user interface is how come resteems can't be separated out (or toggled) from a user's own content. This can be especially frustrating when you're trying to catch up on a person's own posts, or even evaluating if you want to follow a person in the first place! We really don't need one more impediment in the already fragile process of acquiring new interest to your STEEMIT "presence".

I've thought about trying to tackle the issue myself, although most recently, I've been a bit tied up with some other "fun" side-projects, including the Discord WhaleBoT, which I wrote about in my last post.

Then, in the past week, @itchykitten came up with a slick solution in the form of a Chrome extension called exstreemit that would add a "show / hide resteems" button to each profile page that you view. However, I anticipated from my own habits that not everyone would be all that comfortable installing the feature as an extension, even if @itchykitten released the complete source code on github, as you can see here. From some comments I've seen, it does seem that at least a few people would rather not install this feature as an outright extension.

So, as an "alternative solution", I decided it would still be useful to throw together another version using TamperMonkey, a very popular userscript manager. It's also available for Chrome, Microsoft Edge, Safari, Opera Next, and Firefox. So while some people may not be so comfortable adding an entire extension to add one small button to a website, such functionality can easily be added to your TamperMonkey "Dashboard" as just another script to run, complete with source code as well so you can be quite certain there's no "funny stuff" go on.

The Script

Once the script is installed, you will find a new "show resteems" / "hide resteems" button that will toggle the status of the resteems on the profile page you're looking it.

For those who are already familiar with TamperMonkey and want to try jumping right in, just "Create a new script" with TamperMonkey, and paste in the following code named "Hide ReSteems":

// ==UserScript==
// @name         Hide ReSteems
// @namespace    http://tampermonkey.net/
// @version      0.12
// @description  Button to Toggle ReSTEEMs from a User's STEEMIT.com Profile and Feed Page
// @author       @alexpmorris
// @match        https://steemit.com/*
// @grant        none
// @require https://code.jquery.com/jquery-1.12.4.min.js
// @require https://greasyfork.org/scripts/6250-waitforkeyelements/code/waitForKeyElements.js?version=23756
// ==/UserScript==

(function() {
    'use strict';

    var isHiding = false;

    waitForKeyElements ("#posts_list", addReSteemToggleBtn);

    function addReSteemToggleBtn(userDiv) {

        var validUrl = document.URL.replace("https://steemit.com/","");

        if ((userDiv !== null) && (validUrl.startsWith("@")) && ((validUrl.indexOf("/")==-1) || (validUrl.endsWith("/feed"))) ) {

            isHiding = false;
            var zNode       = document.createElement ('div');
            zNode.innerHTML = '<button id="rsButton" type="button"><img id="rsBtnImg" src="https://steemitimages.com/DQmQYXHkLv4A3h8pZ1ntQM1FTTT6knt5EaVUo7hdj2nNAcR/button_hide-resteems.png"></button>';
            zNode.setAttribute ('id', 'rsContainer');
            zNode.setAttribute ('style', 'width:120px; margin-bottom:5px;');
            userDiv.prepend(zNode);

            //activate new button
            document.getElementById ("rsButton").addEventListener (
                "click", ButtonClickAction, false);

            function ButtonClickAction (zEvent) {
                if (!isHiding) {
                    $("#rsBtnImg").attr('src', 'https://steemitimages.com/DQmaRcPxCKNV45aPVaWMbBkP7WvJatgkKqtih7ZCfVsLs4r/button_show-resteems.png');
                    if (validUrl.endsWith("/feed")) $(".PostSummary__reblogged_by").parent('').hide(); else
                        $(".PostSummary__reblogged_by").filter(function () {return ($(".UserNames",this)[0] == null);}).parent('').hide();
                } else {
                    $("#rsBtnImg").attr('src', 'https://steemitimages.com/DQmQYXHkLv4A3h8pZ1ntQM1FTTT6knt5EaVUo7hdj2nNAcR/button_hide-resteems.png');
                    $(".PostSummary__reblogged_by").parent('').show();
                }
                isHiding = !isHiding;

            }

        }
    }

})();

Where's the "Button"?

After copy/pasting the script above into a new TamperMonkey script, you should be set to go! You'll know you're on the right track when the next STEEMIT profile page you visit looks like this:


before hiding...
hide-resteems1.jpg

AFTER hiding!
hide-resteems2.jpg

TamperMonkey VIDEO HowTo...

For those of you unfamiliar with TamperMonkey, this terrific 2 minute video overview should get you right up to speed:

Finally...

You can also find the script code on github.com: https://github.com/alexpmorris/HideResteems

And on greasyfork.org as well: https://greasyfork.org/en/scripts/31120-hide-resteems

It's always possible I've missed something, so if you have any issues, or even just to share your experience with the "Hide ReSteems" script, please be sure to comment below!


As always, I appreciate your upvote, your follow and all your comments!

Sort:  

Really useful stuff, thanks for sharing Alex! I'd never heard of TamperMonkey before this but it looks like I'll be using it more often starting now :) The TamperMonkey HOW TO vid was a great add too

thanks @theywillkillyou, I'm glad so many people are finding this useful, and also very easy to understand and install! :)

@alexpmorris & @itchykitten really great job! Thanks for adding this much needed feature to the UI! :)

Just a small update here, I've also updated the script to support golos.io as well, along with Russian buttons for non-English users. The latest version 0.13 is available from the github.com or greasyfork.org links described in the article.

For those on steemit who would also like to get more involved on golos.io and possibly cross-post over there as well, definitely check out @mrwang's recent post as well: "You Should Really Consider Posting On Golos Too". He explains how you can get started pretty easily just by using the "en" tag on your posts over there.

Cheers, and enjoy! :)

Just... thank yoy

Great job bud! Gunna check this out and see what can be done 😁

thanks, hope you get some good use out of it! :)

just to let everyone know, I released a slightly newer version 0.11 that properly handles those cases where "Resteemed by" is showing.

Hi @alexpmorris. Thanks very much for writing a script for this much desired blog function. I installed the latest 0.11 version and it works fine!

Is it possible to apply this filter/toggle Resteemed script to our Feed/Home page as well? That way we can see new posts in our feed by users we are following, without the clutter of all their resteems as well.

Hmmm I dunno... why don't you try the latest version 0.12 and let me know how it goes! 😉😁

Gee that was quick! It works just fine too. Brilliant Bro! If I could upvote you like a whale boss I would. Resteemed and following you. Thanks!!

Thanks @cupid for the kind words - it was a good suggestion, for some reason I kind of "forgot" resteems were also being shown on feed as well! lol

Anyway, hope you get some great use out of it! :)

Just a warning: Always be very careful with chrome plugins / tampermonkey scripts /whatever ... these things have way more access rights then they should have! I know, because if written some shit to mess with colleagues at work (all in good fun) .... seriously .... be careful

that's always an excellent warning. it's why I tried to keep the script as simple as possible so it's easy enough for people to follow and understand, if they're so inclined to do so.

You know what you are, @alexpmorris?

That's right: you're THE man!

This has been one of main annoyances when using Steemit: how can I quickly spot just the posts authored by a specific Steemonian? Those Resteems really clutter the view.

I had never heard of TamperMonkey, and I'm by no means a coder, but the vid tutorial was simple and straight forward, and look at my interface now:

2017-07-04_1832.png

Boom!

Muchos gracias.

thanks @livenowandwow for the great comment! Happy to see that it was so easy for you to install and get going, especially given you've never even heard of TamperMonkey!

Also hope you'll get lots of good use out of the new "toggle" button! I know I have, and I'm even surprised by how often I now find myself using it as well! :)

You're welcome!

Been using it heavily so far. How did I ever live without it?

I love userscripts! Thanks for this share, this is great!

thank you for your kind words, and I hope you also find it very useful! I know I'm already finding it more useful than even I first realized! :)

Opera Next?
there is more than one Opera?


Question: how about makeing a script that allows the hiding of any or all languages of your choice?
for example...I can only read English...I have no need for spanish, chinese, or any other Language on my feed.
can't understand them...they are of no interest to me.

I hadn't caught that myself, but yes, apparently there is! lol

Opera Next is a parallel build of Opera, with cutting-edge features. ... You can install it and run it independently of your primary version of Opera; the two do not mix. To avoid confusion, Opera and Opera Next are distinguishable by their appearance: Distinct application icons.

believe it or not, that would actually be a lot trickier to do, since there's no "language tag" to filter out. But of course, that's also more of an issue on the public feeds. On your own feed, just don't follow people you can't understand! :)

actually there are language tags.
they aren't always used.
on my feed I mute anything that I can't understand.

what I mean is nothing easily appears consistently in the UI rendering that I could tell to efficiently give an appropriate "indication". if you can find one though, let me know!

could be...I thought I've seen tags for 'korean' and 'spanish'...maybe not.

even then, it would have to show the data on the post list, without having to actually open each post just to extract the data as well (otherwise just think of the overhead)!

no clue.
I'm a user...not a geek.

That's a great feature indeed. Very helpful when checking any users profile. Thanks

thanks! I hope you also find it as useful as I've been, and I literally just built it! lol

That's for sure dude! Thanks for taking your time building it! Everyone will find it useful I'm sure.

This is why I love the scripting community. When a platform is not giving you what you want someone else comes up with a way to make it so!

I’ll give it a try later this week. Think last time I used tampermonkey someone wrote a chat room script to run certain websites.

well, that takes things to a whole other level! lol - this script is a bit simpler than that! :)

sometimes I just want to see the person own's original contents so can determine to follow them to later upvote depending on the quality of their work and active they are to the community. thanx for the video how-to

I've heard that so many times I couldn't even tell you, and that doesn't include the times I've said it to myself! lol

hope it works well for you! :)

Congratulations! This post has been upvoted from the communal account, @minnowsupport, by alexpmorris from the Minnow Support Project. It's a witness project run by aggroed, ausbitbank, teamsteem, theprophet0, and someguy123. The goal is to help Steemit grow by supporting Minnows and creating a social network. Please find us in the Peace, Abundance, and Liberty Network (PALnet) Discord Channel. It's a completely public and open space to all members of the Steemit community who voluntarily choose to be there.

If you like what we're doing please upvote this comment so we can continue to build the community account that's supporting all members.

This is an awesome feature to have. Some users have a way of resteeming way too much... makes it nearly impossible to find their real posts without this kind of tool.

thank you @heymattsokol, hope you'll find it very useful! :)

Very cool @alexpmorris ! I was hoping there would be a feature that would separate my blog content from resteemed posts.

Thanks for contributing a solution! ;)

glad you like it ms @michellectv! :)

lol, you're very welcome mr. @alexpmorris ... so formal!

I don't like to upvote without some comment- this addresses one of those gl;arinlgly obvious needs. Thanks. Coupled with the filter and lack of clutter of the Esteem.Life UI, and the functionality shoots up radically.

thank you for the comment! :)

hell yeah Alex!!!!

Really great post and idea😊 I will check it. Thx for sharing

thank you Sara, hope you find the script useful for yourself as well! :)

Thanks to mumble I discovered this gem :D

hope you get a lot of great use out of it @readmore! :)

Nice..it would help many members..thanks for sharing it with all of us.

glad you also found it useful and helpful! :)

you are welcome. I always appreciate one helping others just like you helped with your post about 'hiding resteem'. Happy steeming. Good luck.

Very rare tutorial . Hats off to you.

I feel like it would take away value from the resteem if people are then just looking at your content and not necessarily checking out what you're into.

you have the option to easily do both, just toggle the button. nothing better than having a choice! :)

This needs to be built in to Steemit as functionality. Most people will not add this script.

No argument from me there, except it's been over a year and one hasn't been implemented yet. However, if you'd be more comfortable with it, you can try using @itchykitten's Chrome Extension instead, or just wait 'til STEEMIT releases something.

I'm just trying to give people an option in the meantime, fully open-sourced in an easy-to-follow script so they can be comfortable with it. If you have any better ideas beyond that, I'm open to suggestions! :)

Link: https://steemit.com/steemit/@itchykitten/extreemit-chrome-plugin-to-hide-resteems-on-profile-pages-original-by-itchy

Very nice and very useful, thanks :)
Image of dksartFollowMeSteemit

This post received a 2.8% upvote from @randowhale thanks to @world5list! For more information, click here!

thank you @world5list and @randowhale for the kind and much appreciated upvote! :)

Congratulations @alexpmorris! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

Award for the number of upvotes

Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

By upvoting this notification, you can help all Steemit users. Learn how here!

Saving this