NF.org

Direct image display

Stan na 30-08-2014. Zobacz najnowsza wersja.

// ==UserScript==
// @name	  NF.org
// @namespace	  https://greasyfork.org/users/4390-seriousm
// @description   Direct image display
// @match         http://newsfilter.org/gallery/*
// @version       0.1
// ==/UserScript==

(function(){
    $('[itemprop="thumbnailUrl"]').each(function(ix, item){
        
        var re = /(.*)prev(.*)--.*(\..*)/; 
        var str = item.src;
        var subst = '$1media$2-$3'; 

        var result = str.replace(re, subst);
        
        $(item).closest('[itemprop="contentURL"]').attr('href',  result);
    });
})();