 |
 |
 |
Userscript index, For non-HV scripts |
|
Mar 8 2020, 14:52
|
ezdiy
Newcomer
 Group: Recruits
Posts: 12
Joined: 10-May 19

|
QUOTE(blue penguin @ Dec 9 2019, 19:34)  ^ Yep, that works.
I've updated the script a few times (there's always improvements to the torrent auto-pick logic), but can't edit the post anymore. What's the recommended venue for this, PM you the update, you edit the post? Move it off to greasyfork?
|
|
|
Mar 8 2020, 15:51
|
Mayriad
Group: Global Mods
Posts: 2,061
Joined: 18-December 10

|
QUOTE(ezdiy @ Mar 8 2020, 14:52)  Move it off to greasyfork?
I think this is the only long-term solution. I use openuserjs.org myself and it is hooked to my GitHub repo for script sync, which houses a wiki as well.
|
|
|
Mar 26 2020, 04:43
|
blue penguin
Group: Gold Star Club
Posts: 10,046
Joined: 24-March 12

|
|
|
|
|
 |
|
Apr 2 2020, 22:29
|
Jay Low
Group: Members
Posts: 435
Joined: 9-July 12

|
This is a script I tried doing but failed miserably. A friend helped and ended up doing it for me. I asked for permission to post here and he said to do as I want with it. Here it is. CODE // ==UserScript== // @name exhImageResize // @namespace website.world // @include https://e-hentai.org/s/* // @include https://e-hentai.org/s/* // @version 1 // @grant none // ==/UserScript==
(function (){ var imgContain = document.getElementById('img').parentNode.parentNode; var currentResize = false; var changeSize = function (){ if(currentResize){ mutating.disconnect(); var img = document.getElementById('img'); img.style.maxHeight = ""; img.style.width = ""; img.style.height = ""; img.style.maxHeight = currentResize; observe(); var heightInterval = setInterval(function(){ var naturalHeight = img.naturalHeight;
if(naturalHeight > 0){ console.log("scroll", img.naturalWidth); img.scrollIntoView(true); clearInterval(heightInterval); } }, 100); setTimeout(function (){ clearInterval(heightInterval); }, 2000); } }; var mutating = new MutationObserver(changeSize) function observe(){ mutating.observe(imgContain, { childList: true, attributes: true, subtree: true, } ); } var resize = function (size){ return function (){ currentResize = size; changeSize(); } } var leftContainer = document.createElement('div'); leftContainer.style.position = "fixed"; leftContainer.style.zIndex = "300"; leftContainer.style.top = "10px"; leftContainer.style.left = "2px"; leftContainer.style.maxWidth = "30px"; var screen = document.createElement('button'); var original = document.createElement('button'); screen.textContent = "screen"; original.textContent = "original"; screen.addEventListener('click', resize("100vh")); original.addEventListener('click', resize("20000px")); leftContainer.appendChild(screen); leftContainer.appendChild(original); document.body.appendChild(leftContainer); })()
Hope someone finds it useful besides me. This script puts two buttons and lets resize the images to screen height or original size by pressing the button
|
|
|
|
 |
|
Apr 2 2020, 23:14
|
Mayriad
Group: Global Mods
Posts: 2,061
Joined: 18-December 10

|
QUOTE(Jay Low @ Apr 2 2020, 22:29)  ...
To be fair, my master script does it better and supports the MPV as well, so please give it a try. Sorry for the shameless advertising, but I think it is really great, and I invested a lot of time into my script so I do want more users to make it worthwhile.
|
|
|
Apr 7 2020, 04:10
|
xxxhentaii
Group: Members
Posts: 434
Joined: 20-November 19

|
Does the "Hide Gallery Comment Section - by hzqr (formerly tiap)." script not work for anyone else?
|
|
|
Apr 7 2020, 20:44
|
Nayas
Group: Members
Posts: 700
Joined: 6-February 11

|
I've been using this line to save sent forum pms for a while and find it extremely useful. As no other script seems to do this I think it should be added to the index. QUOTE(blue penguin @ Sep 3 2017, 20:27)  CODE // ==UserScript== // @name eh-autt-save-pm // @namespace e-hentai // @description Keeps the save PM in sent items checked on page load // @include https://forums.e-hentai.org/index.php?*CODE=04* // @version 0.1 // @grant none // ==/UserScript==
document.getElementsByName('add_sent')[0].checked = true
|
|
|
|
 |
|
Apr 17 2020, 22:04
|
Hellomynameisleo
Newcomer
 Group: Recruits
Posts: 10
Joined: 4-May 15

|
Is it possible to create a userscript that hides all galleries that already have an English translated gallery? For example a RAW gallery "(C89) [Ruki Ruki EXISS (Fumizuki Misoka)] BBA Nabu FF (Final Fantasy VII)" and a English translated gallery "(C89) [Ruki Ruki EXISS (Fumizuki Misoka)] BBA Nabu FF (Final Fantasy VII) [English] [Xinsu Translate]", I want to be able to auto hide the RAW gallery from showing up since it already has an English translation. When I'm searching doujinshi by Artist or Groups it really helps to hide the galleries that already have an English translation.
|
|
|
|
 |
|
Apr 17 2020, 22:36
|
Mayriad
Group: Global Mods
Posts: 2,061
Joined: 18-December 10

|
QUOTE(Hellomynameisleo @ Apr 17 2020, 22:04)  Is it possible to create a userscript that hides all galleries that already have an English translated gallery? For example a RAW gallery "(C89) [Ruki Ruki EXISS (Fumizuki Misoka)] BBA Nabu FF (Final Fantasy VII)" and a English translated gallery "(C89) [Ruki Ruki EXISS (Fumizuki Misoka)] BBA Nabu FF (Final Fantasy VII) [English] [Xinsu Translate]", I want to be able to auto hide the RAW gallery from showing up since it already has an English translation. When I'm searching doujinshi by Artist or Groups it really helps to hide the galleries that already have an English translation.
Not possible. To do that, Tenboro firstly needs to add a game-changing new feature to allow translations and raws to be linked, and then the EH API needs to be modified to return information on each gallery's linked galleries. Tenboro has said he will not add that game-changer, so it is also not something you can wait for.
|
|
|
|
 |
|
Aug 5 2020, 21:04
|
Moonlight Rambler
Group: Gold Star Club
Posts: 6,403
Joined: 22-August 12

|
I made a script so when I click "show tag definition" or "show tagged galleries", the new pages open in a separate tab (or window depending on how you've configured your browser), instead of loading in a popup or in the current tab, respectively. I realize the popup bit has been done already, but whatever. I didn't know when I wrote it. You can view the source [ gitlab.com] here. You can skip that and install it with [ gitlab.com] this link if you would prefer to do so. QUOTE(Jay Low @ Apr 2 2020, 16:29)  This is a script I tried doing but failed miserably. A friend helped and ended up doing it for me. I asked for permission to post here and he said to do as I want with it. Here it is.
-snip-
Hope someone finds it useful besides me.
This script puts two buttons and lets resize the images to screen height or original size by pressing the button
I have a similar script (in terms of function) but it works using hotkeys on the keyboard instead. [ gitlab.com] https://gitlab.com/dragontamer8740/dragonta...-tweaks.user.jsAlso talked about it/described how it works in https://forums.e-hentai.org/index.php?showtopic=236761I'll try this one though, since it might actually not have to wait for the entire image to load before applying the resizing. Thanks a lot. MutationObservers really have a way of making my head spin (since they can easily run wild noticing their own changes to the page). QUOTE(mayriad @ Apr 17 2020, 16:36)  Tenboro has said he will not add that game-changer, so it is also not something you can wait for.
Ability to query the raw database when (I know the answer, I'm just being silly) QUOTE(mayriad @ Apr 2 2020, 17:14)  To be fair, my master script does it better and supports the MPV as well, so please give it a try.
I don't want all that extra functionality unless it's exposed through separate scripts so they can be controlled and toggled as modules. I might look at it for inspiration though. This post has been edited by dragontamer8740: Aug 5 2020, 21:16
|
|
|
|
 |
|
Aug 5 2020, 22:31
|
Mayriad
Group: Global Mods
Posts: 2,061
Joined: 18-December 10

|
QUOTE(dragontamer8740 @ Aug 5 2020, 21:04)  I don't want all that extra functionality unless it's exposed through separate scripts so they can be controlled and toggled as modules.
Yes, they can be controlled and toggled as modules in its GUI control panel. I cannot make separate scripts because that would be super inconvenient for the users compared to what I have now, and feature interaction would be difficult. This post has been edited by Mayriad: Aug 6 2020, 13:40
|
|
|
|
 |
|
Aug 31 2020, 17:56
|
qdjstaylor
Lurker
Group: Lurkers
Posts: 2
Joined: 25-March 15

|
Very easy to use scripts, 10b can not find you registered several trumpets with different IP --NOPE--
PENGUIN EDIT: No scripts which may perform HTTP requests on generated URLs, and contain non ASCII characters. Without a good explanation it is too likely to be malicious (or at least too hard to verify that it isn't).
This post has been edited by blue penguin: Aug 31 2020, 18:08
|
|
|
Aug 31 2020, 18:12
|
Mayriad
Group: Global Mods
Posts: 2,061
Joined: 18-December 10

|
QUOTE(qdjstaylor @ Aug 31 2020, 17:56)  PENGUIN EDIT: No scripts which may perform HTTP requests on generated URLs, and contain non ASCII characters. Without a good explanation it is too likely to be malicious (or at least too hard to verify that it isn't).
I was going to have a look annnnd it is gone.
|
|
|
Aug 31 2020, 18:24
|
blue penguin
Group: Gold Star Club
Posts: 10,046
Joined: 24-March 12

|
QUOTE(Mayriad @ Aug 31 2020, 17:12)  I was going to have a look annnnd it is gone.
Sent you a PM *whink*
|
|
|
Sep 4 2020, 09:09
|
somebody_cares
Newcomer
 Group: Gold Star Club
Posts: 11
Joined: 9-April 17

|
basic keyboard navigation userscript. not sure if the (in)direct reference of panda (@match and that const) should be removed. planning to add theming support (it's there but not 100% ready) and quick nav (à la wox/launchy/spotlight/albert launchers) https://forums.e-hentai.org/index.php?showtopic=241460
|
|
|
Sep 20 2020, 23:07
|
hzqr
Group: Gold Star Club
Posts: 4,672
Joined: 13-May 09

|
[ pastebin.com] https://pastebin.com/raw/r9x8njtVSimple script that groups galleries based on the similarity of their covers, no idea if something similar already exists Use it via the "Group galleries" button under the search bar (only works in thumbnail mode) It's just a proof of concept I made for fun/curiosity, so it leaves a lot to be desired (read: it's pretty shitty) Also, only works on Firefox because Chrome handles canvas tainting differently 🤷
|
|
|
|
 |
|
Sep 21 2020, 01:03
|
blue penguin
Group: Gold Star Club
Posts: 10,046
Joined: 24-March 12

|
QUOTE(hzqr @ Sep 20 2020, 22:07)  [ pastebin.com] https://pastebin.com/raw/r9x8njtVSimple script that groups galleries based on the similarity of their covers, no idea if something similar already exists Use it via the "Group galleries" button under the search bar (only works in thumbnail mode) It's just a proof of concept I made for fun/curiosity, so it leaves a lot to be desired (read: it's pretty shitty) Also, only works on Firefox because Chrome handles canvas tainting differently 🤷 You're alive! Script added. Btw, is the JS PKG (at bundle.run) yours too? If that is the case I'd really like an explanation of CODE {return.59597799*t-.2741761*e-.32180189*n}function c(t,e,n){return.21147017*t-.52261711*e+.31114694*n}function s(t,e){return 255+(t-255)*e} It isn't nothing that seems harmful in any way, but hell magic numbers these are. --------------- Also, I assume (cause I do not have enough time to carefully read it) that the script works on the covers in the current page. i.e. if someone has 200 galleries shown it will compare 200 covers, if 50 are shown then 50 covers are compared. I did not see anything that crawls in there (good) which means that the search is limited to the normal EH search results. Right? (I'm asking because people often have way over the top expectations)
|
|
|
|
 |
|
Sep 21 2020, 21:56
|
hzqr
Group: Gold Star Club
Posts: 4,672
Joined: 13-May 09

|
QUOTE(blue penguin @ Sep 20 2020, 23:03)  You're alive! Script added. Btw, is the JS PKG (at bundle.run) yours too? If that is the case I'd really like an explanation of CODE {return.59597799*t-.2741761*e-.32180189*n}function c(t,e,n){return.21147017*t-.52261711*e+.31114694*n}function s(t,e){return 255+(t-255)*e} It isn't nothing that seems harmful in any way, but hell magic numbers these are. --------------- Also, I assume (cause I do not have enough time to carefully read it) that the script works on the covers in the current page. i.e. if someone has 200 galleries shown it will compare 200 covers, if 50 are shown then 50 covers are compared. I did not see anything that crawls in there (good) which means that the search is limited to the normal EH search results. Right? (I'm asking because people often have way over the top expectations) Bundle.run is a CDN, [ github.com] the library is not mine, it appears the magic numbers are used to convert RGB to YIQ The script does not do any crawling It also happens to be slow as tits
|
|
|
|
 |
|
Oct 12 2020, 06:11
|
Moonlight Rambler
Group: Gold Star Club
Posts: 6,403
Joined: 22-August 12

|
Wrote a new script to make the Fusion (dark colored) forum theme have a "news" link in the top navigation bar like the default theme (Ambience) does. It just replaces the "calendar" link (not present in the Ambience theme) with a "News" link. I made my own button for it; it appears the theme is using SG14 (ShakaGraphics 14) for the buttons, so I did the same. The image itself is embedded in the script as a small (250 bytes) Base64'd PNG, compressed using zopflipng to be as small as I could make it. Note that in base64 form, it is actually 336 bytes of text; 250 bytes is its size when decoded.  In use:  There seems to be some weird bug in the forum software here; when I select the code in the code block it looks like the forum has added a space between 'image/' and 'png' in the MIME type for my data URI, but when I go into the editor mode to fix it, there is no space present. Can anyone shed light on why this is? I've also put the script [ gitlab.com] here, in case there's nothing I can do to fix this on the forum itself. This is tested in GreaseMonkey 3.10, but should work on 4.x and violentmonkey/tampermonkey, since it's quite simple. Some of my 'if' guards are probably useless (I can't imagine a time that there wouldn't be a parentNode for this image), but I'd rather check for them than have to worry about the script dying and putting an error in the console. CODE // ==UserScript== // @name EHF Dark News Link // @namespace dragontamer8740.ehfDarkNews // @description Add "News" link to header on the dark theme on EH Forums // @include http://forums.e-hentai.org/* // @include https://forums.e-hentai.org/* // @version 1 // @grant none // ==/UserScript==
var calendarBtnImg = document.querySelector('img[src="style_images/fusion/fusion_header_calendar.gif"]'); if(calendarBtnImg) // this will be null if using the "ambience" theme; do nothing in that case. { // replace 'calendar' button with homemade 'news' button (I used the Shakagraphics 14 font, if anyone else is wondering; it appears to be a perfect match). calendarBtnImg.src='data:image/ png;base64,iVBORw0KGgoAAAANSUhEUgAAACcAAAAmCAMAAABwIXKiAAAANlBMVEUgISY0Nz8zNj4yNDwwMjovMTkuMDguMDctLzaZmZ4xMzssLjUpKzEPDxIODhEcHSE+QUs0NTtxQvx3AAAAf0l EQVR4Ae2TBRLDMBADzzj9/2uTmG/LHSqzWcoqbC/nFW9u4v6cvIhrl3BOinaHVRwND314XYfC2xXiJ9fVaGPMoita9uhDLgUOpU2a1lQGj+ejkI/am4QhzFjSh1YJ4eczn7e++Xc7979ancmlM7l47/1xHujtl+zL+t7P0QG6tyXAowh3UQAAAABJRU5ErkJggg=='; // old image was 68px; new image is only 39px (half as wide), so we have to fix the layout for it. calendarBtnImg.setAttribute("width", "39"); if(calendarBtnImg.parentNode) // the hyperlink node ('<a href=...>') { calendarBtnImg.parentNode.href='https://e-hentai.org/news.php'; if(calendarBtnImg.parentNode.parentNode) // the 'td' table data node { calendarBtnImg.parentNode.parentNode.setAttribute("width", "39"); } } } --EDIT-- I just made another script. This one fixes the colors of code block and quote block headings with the dark (Fusion) theme (the text is in black, which is quite hard to read and also just looks 'off'). If I find more things wrong with the theme they'll be part of this script in the future, too. This one could probably have been a user CSS style, but there's not really a good option for a user style manager in Seamonkey (my browser of choice); Stylish had spyware and is owned by an ad company so I don't trust it. Therefore I tend to use Javascript to inject CSS into pages instead. This also makes it easier for me to only apply the style when the user is actually using Fusion, rather than having it look bad if I switch back to Ambience. This script is also on gitlab, just like the others I've made. [ gitlab.com] Here. CODE // ==UserScript== // @name EHF Dark (Fusion) Quote and Code Block Color Fixes // @namespace dragontamer8740.ehfFusionFixes // @description Miscellaneous fixes for EH Forums' dark theme ('fusion') // @include http://forums.e-hentai.org/* // @include https://forums.e-hentai.org/* // @version 1 // @grant none // ==/UserScript==
var headStyles=document.head.querySelectorAll('style[type="text/css"]'); // Could do a normal querySelector, but I have to make sure no other scripts // have added styles, so we search until we find css_27.css or run out of // elements to look through. // Fusion's theme ID is 27; Ambience (the default) is 26.
var i=0; while(i<headStyles.length) { if(headStyles[i].innerHTML.includes('style_images/css_27.css')) { var s=document.createElement("style"); s.type="text/css"; s.innerText=` /* Fixes for forum Fusion (dark) theme legibility on quote and code block headings */ .codetop, .sqltop, .htmltop, .quotetop { color: #f1f1f1 !important; } `; document.head.appendChild(s); i=headStyles.length; // don't keep looping, we've found the Fusion theme (id 27). } i++; } This post has been edited by dragontamer8740: Oct 12 2020, 07:44
|
|
|
|
 |
|
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
|
 |
 |
 |
|