Topic: Move the "favorite" button to above the tags and other sidebar items.

Posted under e621 Tools and Applications

I would much like the 'favorite' button to be at the top of everything else considering its the most often used. Or can someone whip up a stylish script to take care of that?

Updated

I made a quick and dirty user script that moves Score and +Favorite to just below the search bar, could get it higher if you want. Not really tested much, but should work. If you need help installing, please tell me your browser (and version).

http://pastebin.com/EpdzGcjg

Updated by anonymous

Queen_Tyr'ahnee said:
This probably would have been better off in the Feature Request Thread https://e621.net/forum/show/30573

Well, maybe next time.

Chessax said:
I made a quick and dirty user script that moves Score and +Favorite to just below the search bar, could get it higher if you want. Not really tested much, but should work. If you need help installing, please tell me your browser (and version).

http://pastebin.com/EpdzGcjg

Its kinda dirty, but it works! I'll take it!

I'm using Firefox whatever the latest version is.

Updated by anonymous

Meek said:
Its kinda dirty, but it works! I'll take it!

I'm using Firefox whatever the latest version is.

  • Install Greasemonkey
  • Restart Firefox (not sure if needed)
  • Save code as a text document and rename to e.g. "favorites.user.js" and drag and drop the file onto a Firefox window (you should be prompted to install the user script)
  • If it does not work, or alternatively, you should have a greasemonkey icon next to your address bar, click the arrow next to it and choose something similar to "new user script", give it some name, click ok and replace everything in the window that pops up with the code and save. That's it. (if that doesn't work ask, though there are lots of resources online for help as well (e.g. Google))

I can change things/add more things if you want, unless maybe if you want to do huge/complicated things. Also you can do whatever you want with the code if you're feeling adventurous.

Updated by anonymous

Lance_Armstrong said:
I want a button that favorites and upvotes the image in a single action.

I think that would be something for eSix extend, right?

Updated by anonymous

Get rekt @Chessax:

// ==UserScript==
// @name        ESFav++
// @namespace   Lance_Armstrong
// @include     http://e621.net/post/show/*
// @include     https://e621.net/post/show/*
// @include     http://e926.net/post/show/*
// @include     https://e926.net/post/show/*
// @version     1
// @grant       none
// ==/UserScript==

var li = document.getElementById("add-to-favs");
if (li)
{
  li.style.position = "fixed";
  li.style.right = "0";
  li.style.bottom = "0";
  li.style.width = "auto";
  li.style.fontSize = "22pt";
  li.style.opacity = "0.8";
  var li = li.children[0];
  li.setAttribute("onclick",li.getAttribute("onclick").replace("return false;",document.getElementById("voteup").getAttribute("onclick")));
}

Fixes the button to the bottom right corner, disappears after click, and favoriting automatically adds +1 to the score.

Edit: omfg it's so much faster my favorites are going to hit 100k in no time.

Updated by anonymous

Lance_Armstrong said:
Get rekt @Chessax:

// ==UserScript==
// @name        ESFav++
// @namespace   Lance_Armstrong
// @include     http://e621.net/post/show/*
// @include     https://e621.net/post/show/*
// @include     http://e926.net/post/show/*
// @include     https://e926.net/post/show/*
// @version     1
// @grant       none
// ==/UserScript==

var li = document.getElementById("add-to-favs");
if (li)
{
  li.style.position = "fixed";
  li.style.right = "0";
  li.style.bottom = "0";
  li.style.width = "auto";
  li.style.fontSize = "22pt";
  li.style.opacity = "0.8";
  var li = li.children[0];
  li.setAttribute("onclick",li.getAttribute("onclick").replace("return false;",document.getElementById("voteup").getAttribute("onclick")));
}

Fixes the button to the bottom right corner, disappears after click, and favoriting automatically adds +1 to the score.

Edit: omfg it's so much faster my favorites are going to hit 100k in no time.

I tired this but it doesn't seem to do anything? Is it supposed work in addition to the previous script?

Updated by anonymous

Meek said:
I tired this but it doesn't seem to do anything? Is it supposed work in addition to the previous script?

Probably isn't meant to work with it, I think it's meant to make the "Add to favorite" button simply also upvote at the same time.

Updated by anonymous

Furrin_Gok said:
Probably isn't meant to work with it, I think it's meant to make the "Add to favorite" button simply also upvote at the same time.

Oh, I was thinking move it to the top and do that but ok.

Updated by anonymous

Lance_Armstrong said:
Get rekt @Chessax:

Fixes the button to the bottom right corner, disappears after click, and favoriting automatically adds +1 to the score.

Edit: omfg it's so much faster my favorites are going to hit 100k in no time.

You just made an UI no-no: a feature that does more and different things than it describes. However since this is third party functionality it's ok ;)

Meek said:
I tired this but it doesn't seem to do anything? Is it supposed work in addition to the previous script?

My script creates a copy of the favorites button and the score section, and just places those near the top, so the original ones will be intact.

Lance's will make the original Favorite button act as a combined Favorite and upvote button as well as be fixed to the window (i.e. always visible).

They probably cannot be used together safely at the moment. Though I blame Lance 'cause he's messing with original UI elements :P

Updated by anonymous

Chessax said:
You just made an UI no-no: a feature that does more and different things than it describes. However since this is third party functionality it's ok ;)

It fits my needs perfectly since I don't favorite everything I upvote but I upvote everything I favorite.

I changed bottom = "0" to bottom = "50%" to help with the furgonomics a bit since I often click Approve and then head straight for the favorite button.

Updated by anonymous

Yeah, if you're going off my comment in the other thread, Chessax, I agree that as a third-party thing it's OK (users can take responsibility for any weird things they *explicitly* add, and any suffering incurred as a result).

An easy improvement (I think, haven't tried it yet) would be to rewrite the text to say something like 'Fav + Up'. Then it wouldn't rely on the user's memory of 'what this actually does' at all.

EDIT: Yep, just add 'li.textContent="+Fav+Up";' at the end of the function.

Updated by anonymous

Anyone wanna clean up Chessax's script a bit so the "+favorite" button changes to the "-favorite" button and stays in the same place. Maybe polish that off by removing the buttons from their original location?

I mean, it works fine as is but a little polish cant hurt right?

Updated by anonymous

Lance_Armstrong said:
It fits my needs perfectly since I don't favorite everything I upvote but I upvote everything I favorite.

I changed bottom = "0" to bottom = "50%" to help with the furgonomics a bit since I often click Approve and then head straight for the favorite button.

Absolutely, I don't doubt that, but I'm doing this mainly for @Meek :)

Meek said:
Anyone wanna clean up Chessax's script a bit so the "+favorite" button changes to the "-favorite" button and stays in the same place. Maybe polish that off by removing the buttons from their original location?

I mean, it works fine as is but a little polish cant hurt right?

Updated again, should work now. Blame me for not testing my code, there might be more bugs, but just complain some more and I'll fix them :)

Probably lots of more/fun things one can do, e.g. incorporate Lance's idea.

You can change whether it should hide the old favorite button or retain it, in the code at the top below the first comment block (defaults to hide (true)). Hiding will definitely not work in combination with Lance's script atm.

(The code got a bit messy/complex since I went maybe a bit too far not to mess with the original content.)

Updated by anonymous

Lance_Armstrong said:
It fits my needs perfectly since I don't favorite everything I upvote but I upvote everything I favorite.

I changed bottom = "0" to bottom = "50%" to help with the furgonomics a bit since I often click Approve and then head straight for the favorite button.

BTW Lance, your script has a surprising side-effect that I guessed at when I was adapting it, and just now confirmed:

If for some reason you hit upvote before fav, hitting fav will cancel out your upvote instead.

(I guess fixing this would add some complexity, as you'd have to either remove the upvote button (weirdly leaving just a downvote button), or check its state before trying to do the upvote.)

Updated by anonymous

savageorange said:
If for some reason you hit upvote before fav, hitting fav will cancel out your upvote instead.

I simply assumed it would throw a "you already upvoted this" error.

It should be trivial to fix.

// ==UserScript==
// @name        ESFav++
// @namespace   Lance_Armstrong
// @include     http://e621.net/post/show/*
// @include     https://e621.net/post/show/*
// @include     http://e926.net/post/show/*
// @include     https://e926.net/post/show/*
// @version     1.01
// @grant       none
// ==/UserScript==

var li = document.getElementById("add-to-favs");
if (li)
{
  li.style.position = "fixed";
  li.style.right = "0";
  li.style.bottom = "50%";
  li.style.width = "auto";
  li.style.fontSize = "28pt";
  li.style.opacity = "0.8";
  var li = li.children[0];
  if (document.getElementById("voteup").className != "greentext")
  {
     li.setAttribute("onclick",li.getAttribute("onclick").replace("return false;",document.getElementById("voteup").getAttribute("onclick")));
  }
}

Updated by anonymous

I went into Lance's code and tweaked it a bit. I made the font size 10px, and shifted it to the right 2px. I particularly like how the favorite button follows me down the page, so if I have a tall post I reading, or one of those posts with an outrageous amount of tags, I can still favorite and +1 it no matter what.

Updated by anonymous

Lance_Armstrong said:
See above for the already upvoted fix (inner if statement)

Oh, I wasn't talking about that, but that was helpful! I added in the if statement, then kind of tweaked it again to move it down to the bottom right hand corner.

... if I knew anymore about coding userscripts and HTML, I'd make a full-fledged UI bar with common tools like edit, jump to comments, report, and maybe even a pop-up box that I can select tags to copy and paste into my blacklist.

Updated by anonymous

Chessax said:
Absolutely, I don't doubt that, but I'm doing this mainly for @Meek :)

Updated again, should work now. Blame me for not testing my code, there might be more bugs, but just complain some more and I'll fix them :)

Probably lots of more/fun things one can do, e.g. incorporate Lance's idea.

You can change whether it should hide the old favorite button or retain it, in the code at the top below the first comment block (defaults to hide (true)). Hiding will definitely not work in combination with Lance's script atm.

(The code got a bit messy/complex since I went maybe a bit too far not to mess with the original content.)

Its GREAT! Maybe post it up on the userscripts.org site or something so it doesn't get lost?

Updated by anonymous

  • 1