// ==UserScript== // @name Scratch Swaggification Homepage Fixer // @author MegaApuTurkUltra // @namespace MegaApuTurkUltra_scripts // @website https://userstyles.org/styles/110430/scratch-2-0-swaggification // @version 0.1.0 // @description Fixes blurry images on the Scratch homepage that normally show up when using the Scratch Swaggification userstyle. // @include http://scratch.mit.edu/* // @include https://scratch.mit.edu/* // @grant unsafeWindow // @require http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js // @copyright CC0 Public Domain // @downloadURL https://update.greasyfork.icu/scripts/8101/Scratch%20Swaggification%20Homepage%20Fixer.user.js // @updateURL https://update.greasyfork.icu/scripts/8101/Scratch%20Swaggification%20Homepage%20Fixer.meta.js // ==/UserScript== this.$ = this.jQuery = jQuery.noConflict(true); if (unsafeWindow.location.pathname == '/') { try { $('.image.lazy').each(function () { var url = $(this).attr('data-original'); url = url.replace('144x108', '480x360'); $(this).attr('data-original', url).attr('src', url); scheduleLoadComplete($(this), $(this).parent().parent()); }); console.log('Project images fixed'); $('.image .lazy').each(function () { var url = $(this).attr('data-original'); url = url.replace('170x100', '394x232'); $(this).attr('data-original', url).attr('src', url); scheduleLoadComplete($(this), $(this).parent().parent().parent()); }); console.log('Swaggification hi-res images activated'); } catch (e) { console.log(e); } } function scheduleLoadComplete(img, li) { var loader = $('

Loading thumbnail...