4chanImageTabber

By Dustfinger Last update Aug 19, 2009 — Installed 995 times.

Workaround that works for everyone

in
Subscribe to Workaround that works for everyone 1 post, 1 voice

drago User
FirefoxWindows

Hi. How to use: click on Greasemonkey - User Script Command - Images
-----------------------------------------------------------------------

 
// ==UserScript==
// @name           4chanImageTabber
// @namespace      Dustfinger
// @description    Opens each image in a topic in a new tab
// @include        http://*.4chan.org/*/res/*
// ==/UserScript==

var newDiv = document.createElement('div');

newDiv.setAttribute('id','NEW_DIV');

var images = document.getElementsByTagName('img');

function openTabs() {

	for (var i = 0; i < images.length; i++) {

		var temp1 = images[i].src.split('/');

		var temp2 = temp1[temp1.length-1].split('.');

		var temp3 = temp2[0].split('s');

		if (temp3[0]*1 > 0){

			if (images[i].src.indexOf('dontblockthis') == -1) {

				GM_openInTab(images[i].parentNode.href);

			}

		}

	}

}

GM_registerMenuCommand ('Images', openTabs)

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel