EsalRider said:
Hi, I've quickly clobbered together a tiny script to get rid of the Random links. (You may need to quote me to copy the code properly, but it should work fine.)

▼ Click to collapse
// ==UserScript==
// @name         No Random Post on e621
// @namespace    https://e621.net/user/show/97563
// @version      0.1
// @description  Removes the "Random" link(s) from the post index and post pages.
// @author       EsalRider
// @match        *://e621.net/post/*
// @match        *://e926.net/post/*
// @grant        none
// ==/UserScript==
(function() {
    'use strict';
    var nl = document.querySelectorAll('a[href="/post/random"]');
    for (var i = 0; i < nl.length; i++)
    {
        var p = nl[i].parentElement;
        if (p.childNodes.length > 1)
        {
            // Removing from sidebar
            p.removeChild(nl[i].nextSibling);
            p.removeChild(nl[i]);
        }
        else
        {
            // Removing from sub-navigation bar
            p.parentElement.removeChild(p);
        }
    }
})();

Also, you can always search for order:random if you want random posts without seeing blacklisted content.

It works! Thanks so much :]


I wish that I didn't have to go in and remove/modify bits of code in order to remove features that I don't want like tag blacklinks.


Can it mass download pools?


Is there a way that I can hide my favorites?


Out of curiosity, can swapping certain words in that script make it hide other things on the site?

Random was the biggest timesink, but some others are 'Trending Tags' and 'Common Tags' on index pages, and the 'Source' under statistics on show pages.

Just trying to make things simpler and less distracting, haha~


Human-Shaped said:
Out of curiosity, can swapping certain words in that script make it hide other things on the site?

Random was the biggest timesink, but some others are 'Trending Tags' and 'Common Tags' on index pages, and the 'Source' under statistics on show pages.

Just trying to make things simpler and less distracting, haha~

If you want to get rid of stuff the script adds I'd suggest right click → view element on firefox or whatever the chrome equivalent is and then looking at the name of the element you want to get rid of and then ctrl+f on the eSix_Extend.user.js and chopping bits out of the code until the stuff you don't want is gone but the script still functions.

That's what I did to get rid of stuff like the blacklinks next to tags, the big old E621 in the top left, the common tags section and changed some of the CSS back and stuff like that.


darryus said:
If you want to get rid of stuff the script adds I'd suggest right click → view element on firefox or whatever the chrome equivalent is and then looking at the name of the element you want to get rid of and then ctrl+f on the eSix_Extend.user.js and chopping bits out of the code until the stuff you don't want is gone but the script still functions.

That's what I did to get rid of stuff like the blacklinks next to tags, the big old E621 in the top left, the common tags section and changed some of the CSS back and stuff like that.

I have Chrome and use Tampermonkey for Extend. Is cutting things out of the script better/worse than making a new script for specific things? Like how EsalRider made one that gets rid of the Random links?

I've never changed a script before so I don't wanna mess something up, lol


Human-Shaped said:
I have Chrome and use Tampermonkey for Extend. Is cutting things out of the script better/worse than making a new script for specific things? Like how EsalRider made one that gets rid of the Random links?

I've never changed a script before so I don't wanna mess something up, lol

Open the script in Notepad++ and make the change and then save the file without closing the window and then refresh the page in your browser if the change you made breaks the script you can just undo what you did that broke it.

If you want you can also make a back up of the original version of the script.

I also have no idea how to script so most of what I did was just trial and error.


Human-Shaped said:
Out of curiosity, can swapping certain words in that script make it hide other things on the site?

Random was the biggest timesink, but some others are 'Trending Tags' and 'Common Tags' on index pages, and the 'Source' under statistics on show pages.

Just trying to make things simpler and less distracting, haha~

Adding is more preferable than striping out, unless you wanna undo changes the script makes, of course. If you just wanna hide certain things you can modify the script's Internal CSS1 by adding lines to it. For example, on line 486, add "a[href='/post/random'] {display:none}", (note the comma and double quotes) to hide the "Random" link on posts. Or better yet, install Stylish and add that same text to it (without them quotes and comma) ;)

Also, to take out the site's branding (big e621 text) comment line 525 and to prevent the script from removing "e621" and "My account" links from the top bar, comment lines 653 to 656

If you wish to modify other parts I can guide you c:

- - - - -

1 The Internal CSS is between lines 363 and 515 (ye, it beeeg), or look up id:"eSixExtend_CSS"
The rest of the functions are literally scattered all over the script :,V


Xch3l said:
Adding is more preferable than striping out, unless you wanna undo changes the script makes, of course. If you just wanna hide certain things you can modify the script's Internal CSS1 by adding lines to it. For example, on line 486, add "a[href='/post/random'] {display:none}", (note the comma and double quotes) to hide the "Random" link on posts. Or better yet, install Stylish and add that same text to it (without them quotes and comma) ;)

Also, to take out the site's branding (big e621 text) comment line 525 and to prevent the script from removing "e621" and "My account" links from the top bar, comment lines 653 to 656

If you wish to modify other parts I can guide you c:

- - - - -

1 The Internal CSS is between lines 363 and 515 (ye, it beeeg), or look up id:"eSixExtend_CSS"
The rest of the functions are literally scattered all over the script :,V

Ah, okay~

That would be nice! EsalRider made one that takes care of the Random links, so that one's good. If you could guide me on removing the 'Trending Tags' and 'Common Tags' on post/index pages, and the 'Source' under statistics on post/show pages, I'd be grateful~


Human-Shaped said:
Ah, okay~

That would be nice! EsalRider made one that takes care of the Random links, so that one's good. If you could guide me on removing the 'Trending Tags' and 'Common Tags' on post/index pages, and the 'Source' under statistics on post/show pages, I'd be grateful~

Easy peasy. For "Trending Tags" and "Common tags" add "div.sidebar div:not(:nth-child(1)) {display:none}" to the internal CSS or Stylish (without quotes). That line will just leave you with the search box

For the Statistics one is easier peasier, add "div#stats {display:none}" to the same area.

:)


Xch3l said:
Easy peasy. For "Trending Tags" and "Common tags" add "div.sidebar div:not(:nth-child(1)) {display:none}" to the internal CSS or Stylish (without quotes). That line will just leave you with the search box

For the Statistics one is easier peasier, add "div#stats {display:none}" to the same area.

:)

Huge noob here, but when you say internal CSS do you mean making a new script in Tampermonkey, or copy-pasting that "div" stuff in Extend's current script?

Or, is it that menu you get when you right click/inspect?

I tried putting

"div.sidebar div:not(:nth-child(1)) {display:none}
div#stats {display:none}"

(without the quotes) in Extend's current script, but that just made some things not work properly. Obviously I'm doing something wrong xD

I changed it back to normal, so at least I can do that right -w-


Human-Shaped said:
Huge noob here, but when you say internal CSS do you mean making a new script in Tampermonkey, or copy-pasting that "div" stuff in Extend's current script?

Or, is it that menu you get when you right click/inspect?

I tried putting

"div.sidebar div:not(:nth-child(1)) {display:none}
div#stats {display:none}"

(without the quotes) in Extend's current script, but that just made some things not work properly. Obviously I'm doing something wrong xD

I changed it back to normal, so at least I can do that right -w-

Oops. Yeah, by internal css I mean the one on the script. Or if it's better for you, get Stylish ( Firefox / Chrome )

Open Stylish, then click the three-vertical-dots button and then "Create New Style". On it, you can paste those lines in the "Code" box: On "Applies to" change it to "URLs on the domain" and type "e621.net" on the box that appears, give it a name and save it.

You should have something like this


Xch3l said:
Oops. Yeah, by internal css I mean the one on the script. Or if it's better for you, get Stylish ( Firefox / Chrome )

Open Stylish, then click the three-vertical-dots button and then "Create New Style". On it, you can paste those lines in the "Code" box: On "Applies to" change it to "URLs on the domain" and type "e621.net" on the box that appears, give it a name and save it.

You should have something like this

It worked! Thanks so much for the time and effort helping me~ :]

The only remaining problem is the 'hide the sidebar except for search' is working on post/show pages too, and I only need it to work on index pages. Is there a away around that?

I tested the 'hide statistics' script by itself and it works fine. But since I actually use the post page tags, I gotta figure out how to make the script for hiding sidebar stuff only work on index pages... Or maybe make it say 'hide all sidebars but IF there are just regular post page tags, don't?' @[email protected]


Human-Shaped said:
It worked! Thanks so much for the time and effort helping me~ :]

The only remaining problem is the 'hide the sidebar except for search' is working on post/show pages too, and I only need it to work on index pages. Is there a away around that?

I tested the 'hide statistics' script by itself and it works fine. But since I actually use the post page tags, I gotta figure out how to make the script for hiding sidebar stuff only work on index pages... Or maybe make it say 'hide all sidebars but IF there are just regular post page tags, don't?' @[email protected]

D'oh! Forgot that they have the same name on both pages! >_<

I'll look up how to differentiate between the pages, so gimme a sec

Edit: Alright, this is how the lines should look like

/* Hide everything but search box on index pages */
div#post-list div.sidebar div:not(:nth-child(1)) {display:none}
 
/* Hide "Statistics" section on post pages */
div#post-view div.sidebar div#stats {display:none}

Thank pete it did not require complex code but just a really simple addition n_n;


Xch3l said:
D'oh! Forgot that they have the same name on both pages! >_<

I'll look up how to differentiate between the pages, so gimme a sec

Edit: Alright, this is how the lines should look like

/* Hide everything but search box on index pages */
div#post-list div.sidebar div:not(:nth-child(1)) {display:none}
 
/* Hide "Statistics" section on post pages */
div#post-sidebar div#stats {display:none}

Thank pete it did not require complex code but just a really simple addition n_n;

We're getting closer! owo

That did differentiate the pages, so index sidebars are hidden and post tags are there. But now statistics are back xD

Is it just me?


Human-Shaped said:
We're getting closer! owo

That did differentiate the pages, so index sidebars are hidden and post tags are there. But now statistics are back xD

Is it just me?

There was a typo, sorry! I corrected it on my post c:


Xch3l said:
There was a typo, sorry! I corrected it on my post c:

That did it! owo

Thanks so much for your patience with me, and everything you do for that matter. You've improved this site in so many ways, haha~

Yeah for hiding stuff like that, I often wonder if esix will ever have a 'simplify everything' option as far as the site layout goes. Who knows, lol. At least we have stuff like Stylish to cut down on clutter here and there.

I'm still waiting for them to switch to not needing cookies for blacklists anymore. A couple years ago I heard that if that happened, we'd have nearly-infinite space instead of the 3900 character limit. Sounded pretty cool xD


Heya, so as I posted on blip #80634, blip #80635 and blip #80638, I'm releasing the rewrite of the script ("let's call it an Open Beta") in its current state as I think it's stable enough to show what do I have right now.

At first glance it looks like the original version but it's still missing a lot of things while at the same time, having new ones. I'll list them below. Also, a link for the current dev version will be at the bottom of this post <3

Missing features:

  • Formatting buttons
  • Updating of subscriptions
  • Updating of custom links
  • Expansion of comment text areas (and different font)
  • Pool/Set reorganization
  • Post Source helper
  • Common tags
  • Hotkeys customization (see note 5)
  • Pretty much all settings present in eSixExtend1

New features:

  • Choose between ''Classic Mode'' and "New Mode" ( smaller bar that opens a full panel on click). "NM" glows telling you about this click him! :D
  • Better notifications (glowing item instead of Italicising them for better attention-grabbing) + red dot when in "New Mode"
  • Multiple profiles support (should work, haven't tested it :T )
  • Separate "Favorite" / "Unfavorite" hotkey as HIMofangels pointed out on forum #251656
  • Automatic scrolling of long user names when hovering comments (it was an old script that I finally added)
  • Prolly a couple more I'm forgetting right now :X

Planned features:

  • Better subscription updating/managing (framework is there, just not implemented yet)
  • In-page preferences dialog for the script ("P▶" on the bar, "Preferences" on the panel; not working either yet, burps an error message)
  • Touch-like scrolling and Pinch zooming (tempting with the newest Laptop/PC touchscreens ;) )
  • More attention from my part
  • Ideas?

Notes:

  • "Posts" and "Upload limit" aren't very accurate because the API doesn't expose counts for pending posts or base upload limit (both are considered 0 and 10 when displaying that line)
  • Previous settings should carry to this version (to make migrating painfully easy)
  • Notification "beeping" doesn't go away (unless you've caught up with your subscriptions and a few select custom links - post and comments searches)
  • "Favorites" count doesn't update except the first time it was installed
  • Current avaiblable hotkeys are: Fave/unfave ("F"), Upvote ("G") and Downvote ("D")
  • Scrolling on the user links section inside the panel seems jerky at times. Scrollbar doesn't display unless you scroll down
  • Subscriptions dialog is really, really primitive right now
  • For some reason, "Subscriptions" doesn't show up when clicking it from the panel (New Mode) but from the userbar does (Classic Mode)
  • Only thing that remembers is if you've tried New Mode and which mode you're using
  • Might not work completely with Greasemonkey. Since there's no Firefox support above v52 on Windows XP, I can't test it on it :/ (why am I still running WinXP? See blip #78351)

Since I consider it like an "open beta", bug reports, suggestions, stuff than can be improved or things I'm totally missing are, as always, more than welcome c:

Current version (180504.50)

tsai
Member
6 days ago

Thanks for the update :)


Hey guys, I just realized I forgot to post a patch that was supposed to go to the original version. Since I can't access Firebase1 anymore you'll have to edit the script on your ends.

So, please replace lines 732 and 733 with this:

        // Prevent checking for updates if link is not up to date already
        // or before 5 minutes have passed
        if((ublink.nextCheck || 0) > rightNow() || ublink.skip == true || ublink.last != ublink.current) return;
        ublink.nextCheck = rightNow() + 300000;

What this does is add a small cooldown to userlink updater. What it does right now: it checks for updates on every page load (up to 10 could be checked at the same time) which on a single page doesn't seem much but I have been told that people rarely open up one or two tabs :V . So it was brought to my attention (thanks Kira!) that it's helping cause some strain on the server with its way of checking for updates.

After applying this, checks should be done every 5 minutes, thus making the servs sweat less c:

- - - - -

1 Firebase is where I'm hosting the original version, where as the current, rewritten version is on my old computer

tsai said:
Thanks for the update :)

You're welcome~


Thanks for further development on an awesome script!

Xch3l said:
Since I can't access Firebase1 anymore you'll have to edit the script on your ends.

Have you considered using github for hosting? That way you wouldn't have to rely on Firebase, or on a dynamic ip (I'm guessing directly to your computer?). It's free and has the added benefits of version history, issue tracking, and people can submit pull requests.


Uh... Version 180517.01 failed to execute. The console said createElement on line 22 was undefined. Changing it to document.createElement solved the probem. (Using latest Google Chrome on Win10 x64)


BlueTibbit said:
Thanks for further development on an awesome script!

Have you considered using github for hosting? That way you wouldn't have to rely on Firebase, or on a dynamic ip (I'm guessing directly to your computer?). It's free and has the added benefits of version history, issue tracking, and people can submit pull requests.

You'd be surprised! That's another reason why I wanted to rewrite the script, and why it's sectioned like it is, so it can be split and/or rebuilt quickly :D

EsalRider said:
Uh... Version 180517.01 failed to execute. The console said createElement on line 22 was undefined. Changing it to document.createElement solved the probem. (Using latest Google Chrome on Win10 x64)

Ah, thing is because I moved the debugging section to be the topmost, making the monkey wonder where createElement is (few lines after). Actually, relocating that section to the bottom (where it was), or as I just did, scares the buggo (at least on Firefox 52 :x)