Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Highlighter script?

 
post May 12 2016, 04:31
Post #1
Simpleton8



Casual Poster
****
Group: Members
Posts: 336
Joined: 2-November 15
Level 264 (Godslayer)


So I modified the parse function in the highlighter script to make l:english default. It works, but also crosses all the other tags once you open the gallery (which is just visually annoying): [pastebin.com] http://pastebin.com/Pb9Z37na . What's the best way to go around that?

Is there a better place to discuss the script?


A future work of this "filter in" function would be to make certain popular tags "default" by clicking on a button (not exactly because it would hide all the galleries without the tags - so you would see several blank pages if you search unpopular tags - don't think there's a way to get around without an overhaul of the script/may require something on server's side/similarly for filter out).

This post has been edited by Simpleton8: May 12 2016, 13:52
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post May 12 2016, 15:17
Post #2
blue penguin



in umbra, igitur, pugnabimus
***********
Group: Gold Star Club
Posts: 10,045
Joined: 24-March 12
Level 500 (Godslayer)


QUOTE(Simpleton8 @ May 12 2016, 03:31) *
Is there a better place to discuss the script?
Well, keeping a script as a thread in this subforum is completely fine. The place where the scripts are aggregated is on the wiki, and you can see there that most are maintained as threads here. I never kill such threads.

Personally, i have a separate github account for the scripts i do. It is another option if you can be bothered to maintain one.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post May 12 2016, 17:11
Post #3
Simpleton8



Casual Poster
****
Group: Members
Posts: 336
Joined: 2-November 15
Level 264 (Godslayer)


Some of the scripts I'm using are not on there. For example, the [sleazyfork.org] highlighter script, which I'm pretty certain is allowed because other posters here recommended it.

Anyone knows how I can contact the script author ([sleazyfork.org] etc) or if he is still around?

What's the best way to debug EH greasemonkey scripts?

___
For the visual problem (all tags crossed out in gallery) + adding more default tags in search, the cleanest & most reasonable way is to create another box below the boxes for keywords & filters and perhaps title it "filter in". Another potential solution is to have certain tags pretyped every time one goes to the search page.

I am guessing the best way to get help coding the scripts is probably not here (or through pming a few. I tried the two irc channels, and it seemed that most people there don't discuss EH scripts beyond what they do.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post May 12 2016, 17:31
Post #4
blue penguin



in umbra, igitur, pugnabimus
***********
Group: Gold Star Club
Posts: 10,045
Joined: 24-March 12
Level 500 (Godslayer)


QUOTE(Simpleton8 @ May 12 2016, 16:11) *
Some of the scripts I'm using are not on there. For example, the [sleazyfork.org] highlighter script, which I'm pretty certain is allowed because other posters here recommended it.
The list only gets updated when someone can be arsed to edit the wiki.

For example, i'm not keen on adding your pastebin in there because it will cause confusion to newbies. If you look at tiap's and ctxl's scripts they always contain the userscript headers in a generic fashion, that makes it easier for newbies to just drop the script into the browser window.

QUOTE
Anyone knows how I can contact the script author ([sleazyfork.org] etc) or if he is still around?
Searching is your best option. And as you mentioned the IRC, that is a good idea too. People on the IRC have good memories.

QUOTE
What's the best way to debug EH greasemonkey scripts?
Just as any other piece of javascript (which is a pretty nasty business most of the time). Firebug and tamper data are always recommended by me, and, if you can deal with the possibility that things break outside of the environment/script you want to test "use strict;" is a good thing too.

As for help in coding a script see [eloquentjavascript.net] Eloquent Javascript, i love that book. And it is free.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post May 12 2016, 19:38
Post #5
Simpleton8



Casual Poster
****
Group: Members
Posts: 336
Joined: 2-November 15
Level 264 (Godslayer)


QUOTE(blue penguin @ May 12 2016, 17:31) *

The list only gets updated when someone can be arsed to edit the wiki.

For example, i'm not keen on adding your pastebin in there because it will cause confusion to newbies. If you look at tiap's and ctxl's scripts they always contain the userscript headers in a generic fashion, that makes it easier for newbies to just drop the script into the browser window.


Okay, if I make a script and share it. I'll add the appropriate header similar to tiap's:
CODE
// ==UserScript==
// @name           EHF - Forum Tools
// @version        1.0
// @namespace      EHFSB
// @match          http://forums.e-hentai.org/index.php*
// @match          https://forums.e-hentai.org/index.php*
// @run-at         document-end
// ==/UserScript==


QUOTE(blue penguin @ May 12 2016, 17:31) *

Searching is your best option. And as you mentioned the IRC, that is a good idea too. People on the IRC have good memories.

I used to idle on the irc but found that to be a big distraction. I'll drop by from time to time again.

QUOTE(blue penguin @ May 12 2016, 17:31) *

Just as any other piece of javascript (which is a pretty nasty business most of the time). Firebug and tamper data are always recommended by me, and, if you can deal with the possibility that things break outside of the environment/script you want to test "use strict;" is a good thing too.

Thanks. Already using firebug, Will look into tamper data and use strict (IMG:[invalid] style_emoticons/default/smile.gif).

QUOTE(blue penguin @ May 12 2016, 17:31) *

As for help in coding a script see [eloquentjavascript.net] Eloquent Javascript, i love that book. And it is free.

Thanks. I thought it's one of the best tutorials too; it's recommended/required for one of the coding bootcamps in California (IMG:[invalid] style_emoticons/default/smile.gif).
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post May 31 2016, 02:49
Post #6
Simpleton8



Casual Poster
****
Group: Members
Posts: 336
Joined: 2-November 15
Level 264 (Godslayer)


Decided to use a hotkey instead i.e., (assign Alt-c to clear search + prefill "language:English" Alt-v to append " language:English " by modifying [userscripts-mirror.org] http://userscripts-mirror.org/scripts/show/9517):. Just need the below + the original shortcut function.

CODE

(function(){
    function preFillComment() {
        document.getElementsByName('f_search')[0].value = 'language:English ';
        document.getElementsByName('f_search')[0].focus();
        document.getElementsByName('f_search')[0].setSelectionRange(30,30);
    }
    var mainShortcut = (GM_getValue('mainShortcut') != undefined && GM_getValue('mainShortcut') != '') ? GM_getValue('mainShortcut') : "ALT+C";
    shortcut(mainShortcut,preFillComment);

    function resetPreFillComment() {
        document.getElementsByName('f_search')[0].value = document.getElementsByName('f_search')[0].value +' language:English ';
        document.getElementsByName('f_search')[0].focus();
        document.getElementsByName('f_search')[0].setSelectionRange(120,120);
    }
    var resetShortcut = (GM_getValue('resetShortcut') != undefined && GM_getValue('resetShortcut') != '') ? GM_getValue('resetShortcut') : "ALT+V";
    shortcut(resetShortcut,resetPreFillComment);

})();


Last two lines in the function set the focus at the end of the search box.

This post has been edited by Simpleton8: Jun 1 2016, 01:04
User is offlineProfile CardPM
Go to the top of the page
+Quote Post


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 


Lo-Fi Version Time is now: 16th May 2024 - 09:06