// ==UserScript== // @name Pouet 'YT embed' | v0.02 // @description replace the screenshot of the prods on Pouet.net by the embedded YT capture if possible // @include http://pouet.net/prod.php* // @include http://*.pouet.net/prod.php* // ==/UserScript== /* (c) August 2012 by Mathieu 'P01' HENRI ( http://www.p01.org ). Updated by Kabuto to use original screenshot as placeholder with play button in front. */ !(function() { // replace screenshot by embeded YT capture if possible var screenshot = document.querySelector('img[src^="screenshots/"][title^="screenshot added on the "]'); var yt = screenshot && document.querySelector('#mainDownload ~ a[href*="v="][href*="youtu"]'); if( yt ) { GM_addStyle(".yt-play {display:inline;cursor:pointer;} .yt-play > div {position:relative;height:0;width:89px;} .yt-play > div > div {position:absolute;left:0;top:" + (-31-screenshot.offsetHeight/2) + "px;width:89px;height:62px;border-radius:8px;color:white;font-size:40px;box-shadow:0 0 8px white;background:black;} .yt-play:hover > div > div {background:#C00;}"); screenshot.parentNode.innerHTML = '