Jonathan Ong's Blog

My Vast Knowledge of Nothing

List of Reddit Javascripts Shortcuts & Tricks

without comments

Collapse all comments / just show parents:

javascript:(function(){$(“.child%20.comment%20.noncollapsed%20.expand”).click();})()

Upvote everything on the page (don’t use too often as you can be branded a bot):

javascript:$(“.up”).click()()

Downvote everything on the pageĀ (don’t use too often as you can be branded a bot):

javascript:$(“.down”).click()()

Show all directly linked pictures:

javascript:%20var%20x=%20$(“.content”).find(“a”).each(function(){var%20href=$(this).attr(“href”);if((!$(this).hasClass(“drowsapMorphed”))%20&&%20($(this).next(“.drowsapMorphed”).length==0)%20&&%20href%20&&%20(href.indexOf(‘imgur’)>=0%20||%20href.indexOf(‘jpeg’)>=0%20||%20href.indexOf(‘jpg’)>=0%20%20||%20href.indexOf(‘png’)>=0)){var%20ext%20=(href.indexOf(‘imgur’)>=0%20&&%20href.indexOf(‘jpg’)<0%20&&%20href.indexOf(‘png’)<0)%20?%20′.jpg’%20:”;%20var%20img%20=%20$(“<a%20class=’drowsapMorphed’%20href=’”+href+”‘%20target=’blank’%20style=’display:block’><img%20style=’display:block;max-width:780px;’%20src=’”+href+%20ext+”‘%20/></a>”);$(this).after(img);}});

Hide or show comments up to a certain depth level:

javascript:
var depth = prompt(“Choose maximum comment depth (min = 1, max = 10)”) * 1;
if (depth >= 1 && depth <= 10) {
(function toggle_children() {
$(document).find(“.comment .child .entry .collapsed .expand”).click();
$(document).find(“.comment ” + Array(depth + 1).join(“.child “) + “.entry .noncollapsed .expand”).click();
})()
}

javascript:var depth = prompt(“Choose maximum comment depth (min = 1, max = 10)”) * 1;if (depth >= 1 && depth <= 10) {(function toggle_children() {$(document).find(“.comment .child .entry .collapsed .expand”).click();$(document).find(“.comment ” + Array(depth + 1).join(“.child “) + “.entry .noncollapsed .expand”).click();})()}

Fix the Reddit search feature by using Google:

javascript:void(document.forms['search'].action=’http://www.google.com/search‘); void(document.forms['search'].onsubmit=function() { document.forms['search'].q.value=’site:www.reddit.com ‘ + document.forms['search'].q.value; });

A new and improved Javascript bookmarklet to view all images in a thread. You can also read the comments in the link to Reddit.

Written by jong

July 19th, 2010 at 9:56 am

Posted in Internet,Social

Tagged with

Leave a Reply