Created
August 24, 2017 06:43
-
-
Save anonymous/503281c142e53ba2e1db0209a31cb4be to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name dribbble show big picture | |
// @namespace dribbble | |
// @include http*://*dribbble.com* | |
// @version 1 | |
// ==/UserScript== | |
(function(){ | |
var callback = function(e){ | |
e = e.target ; | |
if( e && e.querySelector){ | |
e = e.querySelector('.single-img'); | |
var flag = 'div[class*="full-"] div' ; | |
if( e && !e.matches(flag) ){ | |
var timer = setInterval(function(){ | |
if( e.matches(flag) ) | |
clearInterval(timer); | |
else | |
e.click(); | |
},500); | |
} | |
} | |
}; | |
addEventListener('DOMNodeInserted',callback); | |
addEventListener('DOMContentLoaded',callback); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment