dofiga.net thumb linker

By spat72 Last update Nov 30, 2008 — Installed 101 times.

Script update 03.09.2011

in
Subscribe to Script update 03.09.2011 1 post, 1 voice

Maon User
Chrome

// ==UserScript==
// @name dofiga.net thumb linker
// @namespace spat72
// @description changes default image link to a direct image link
// @include /^http://(www\.)?dofiga\.net/\?post=\d+$/
// ==/UserScript==

var allLinks = document.getElementsByTagName('a')

for(var i=0; i < allLinks.length; i++) {
if (allLinks[i].href.match('/?image')){
allLinks[i].href = allLinks[i].href.replace('/?image=','/images/news/'+
location.href.replace(/.*?(\d+)+/, "000000$1").substr(-7)+'/'
);
allLinks[i].href = allLinks[i].href += '.jpg';}
}

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