Comments by Junk Blocker on scripts

45 comments

2.0 is very graphics heavy though so I am not sure if it is really worth it. But hey, if somebody wants it, I'll get to it next week :)

EDIT: Sorry, after fiddling with it a bit, I don't think I want to spend time to update or maintain it any longer. The new blue style works ok enough for me.

Comment on:
Reddit Zebra-izer (Alternate)

Jul 11, 2008

No, oddiophile, it is not worth the effort for me.

Comment on:
Reddit Zebra-izer (Alternate)

Apr 2, 2008

oddiophile: This script just adds CSS tags for row marking that reddit itself does. With hiding of rows, dynamic expansion of comments etc. it is a complex problem for reddit to mark those tags correctly. I have just left it here because it provides *some* readability.

Comment on:
Programming.reddit.com highlighter

Mar 15, 2008

Could you please add the new

http://reddit.com/r/programming/*

style url to includes?

Thanks

Comment on:
Reddit tags

Oct 17, 2007

The only change is that tr ids have been changed from site* to thingrow*. So lines 63-64 change from

		if (tr.id && tr.id.match(/^site.*/)) {
      scoreId = tr.id.replace(/site/,'score');
		if (tr.id && tr.id.match(/^site.*/)) {
      scoreId = tr.id.replace(/site/,'score');

to

		if (tr.id && tr.id.match(/^thingrow.*/)) {
      scoreId = tr.id.replace(/thingrow/,'score');
		if (tr.id && tr.id.match(/^thingrow.*/)) {
      scoreId = tr.id.replace(/thingrow/,'score');

and line 68 from

        titleSpan = document.getElementById(tr.id.replace(/site/,'title'));

to

        titleSpan = document.getElementById(tr.id.replace(/thingrow/,'title'));

Comment on:
Reddit tags

Oct 17, 2007

Hi Jeffrey Palm, With reddit change, this very essential script is not working anymore. Do you plan on updating this soon? If not I'll probably do a new alternate version. Thank you!

Comment on:
Reddit Zebra-izer

Oct 11, 2007

I just released Reddit Zebra-izer (Alternate)

http://userscripts.org/scripts/show/12922

which IMHO is a much cleaner way to do this as reddit is already providing evenRow, oddRow classes. Since most people are using this script currently, I don't mind if the author switches to that way of doing highlighting.

Comment on:
Reddit filter

Jul 8, 2007

The link class name changes to "title loggedin" rather than just "title" etc. when a user is logged in so I had to change line 94 to

if (!a.className.match(/\btitle\b/)) continue;

to get it going. Also a check should be made to not have empty filter otherwise it ends up excluding all stories.

Thanks

Comment on:
Bad Guy Sticker

Jul 5, 2007

"Polygram Records" is missing from RIAA site and hence from this script too but is a member.

Comment on:
Hiragana/Katakana Romanizer

Jul 2, 2007

Excellent idea!!!

hi, I've finally added your individual library linking code to my script. Thank you :)

Comment on:
Script Updater

May 14, 2007

Thanks for updating! Please also change to

          r=res.match(new RegExp('<a[^>]*href[^>\\d]*(\\d+)[^>]*>'+xs+'[\s\r\n]*<\\\/a>','i'));

for scripts like 'ALT Tooltips', 'BoingBoing Butler' and 'Google about.com remover' to be discovered.

Note 1: "Pagerization" is a script which can not be discovered since the script content and metadata on the site differ :(. Maybe something similar is happening with my 'RSS+Atom Subscribe Button Generator' script which is not getting discovered either.

Note 2: I am in the habit of tweaking my scripts and that affects the hash. A diff would be great for such cases. There are a few javascript diff libs out there which can be used to show diffs. Time permitting I'll get around to coding that within a week unless you get to it first *wink wink* ;)

Comment on:
Script Updater

May 13, 2007

Edit: I made the following change in my version around line 114:

        } else xhr('http://userscripts.org/scripts/search?q='+encodeURIComponent(name),function(res,p,s){
          var xs = s.replace(/\&/g, '&amp;').replace(/([ \\\'\"\(\[\]\)\+\?\:\\^\.\*\<\>-])/g, "\\$1");
          r=res.match(new RegExp('<a[^>]*href[^>\\d]*(\\d+)[^>]*>'+xs+'<\\\/a>','i'));

Helps match my amazon script with & in the name :)

Comment on:
Script Updater

May 13, 2007

I made the following change in my version around line 114:

        } else xhr('http://userscripts.org/scripts/search?q='+encodeURIComponent(name),function(res,p,s){
          var xs = s.replace(/\&/g, '&amp;').replace(/([ \\\'\"\(\[\]\)\+\?\:\\^\.\*\<\>-])/g, "\\$1");
          r=res.match(new RegExp('<a[^>]*href[^>\\d]*(\\d+)[^>]*>'+xs+'<\\\/a>;','i'));

Helps match my amazon script with & in the name :)

Comment on:
Delicious Links

May 11, 2007

Thanks flyne, This is very useful. I added the following to the end of the highlight method in my copy

if (GM_getValue(window.location.href)) {
    document.title = '@.@ ' + document.title;
  }

A few broken script out there try to provide this functionality which can be got from your script for cheap.

Comment on:
RSS+Atom Feed Subscribe Button Generator

Apr 13, 2007

Done. Thanks for the feedback/feature request! :)

Comment on:
RSS+Atom Feed Subscribe Button Generator

Apr 13, 2007

PierreMass, I will add that option this weekend.

Comment on:
Bad Guy Sticker

Apr 13, 2007

Woohoo! Finally it's here on userscripts.org. I've been using it forever. Great work! Keep it up!

I am just helping myself as a user of the library :)

I like your facility of linking to library location and hours on the library page for the book and was thinking of implementing the same in my version this weekend too.

Comment on:
Embedded media linker

Apr 12, 2007

Could you wrap the script in an anonymous function wrapper and return immediately for text/plain docs? Executing this on text/plain makes firefox crash.

(function(){

if (document.contentType() == 'text/plain') return;

... your old code...

})();

Comment on:
RSS+Atom Feed Subscribe Button Generator

Apr 10, 2007

Thank you joshyu! :)

Comment on:
MonkeyBarrel Google

Apr 8, 2007

That should be 'alien_scum'.

(The comments on scripts should also be editable !)

Comment on:
MonkeyBarrel Google

Apr 8, 2007

Thank you alien_sum :)

Comment on:
MonkeyBarrel Google

Apr 7, 2007

On some pages like

http://ftp.vim.org/pub/vim/patches/7.0/README

the Monkey Head does not get inserted. Now if someone has firebug enabled, the showmonkey() function ends up causing a massive DoS by spewing errors on

document.getElementById('monkeyhead').width=size;

I came home to find my firefox stuck and thrashing at about a few hundred thousand of these error messages.

Comment on:
Twitter Display Name Mod

Apr 1, 2007

Extended condition to do a litte more (before AJAX refreshes add more content :( ).

if (divs[i].className.match(/^(tab|wrapper)$/)) {
  var strong = divs[i].getElementsByTagName('strong');
  for (var j = 0; j < strong.length; j++) {
    var username = strong[j].getElementsByTagName('a')[0].innerHTML;
    if (username.match(/^[a-z0-9_]+$/i)) {
      var displayname = strong[j].getElementsByTagName('a')[0].title;
      strong[j].getElementsByTagName('a')[0].innerHTML = displayname;
      strong[j].getElementsByTagName('a')[0].title = username;
    }
  }
}