Last active
August 30, 2017 04:58
-
-
Save rsc-awhite/12c263dd7c6e5750f1b595b01eade36f 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 Hamish and Andy merch site closed bypass | |
// @description Bypasses closed sign. Fast and loose baby! | |
// @author Whitey | |
// @include https://merch.hamishandandy.com/* | |
// @run-at document-end | |
// ==/UserScript== | |
window.addEventListener('load', function() { | |
console.log("HandA script loaded fine"); | |
// The whole this just just dropped with a div overlay and a style. If you kill the style (embedded in the body, probably copy/pasted into the footer on some cafepress style WYSIWYG editor), everything works normally | |
styles = document.body.getElementsByTagName("style"); | |
for (x=0;x<styles.length;x++) { // Loop and search is necessary as the website varies where and when it loads different inline style tags | |
if (styles[x].innerHTML.indexOf("overlay-bg.png") !== -1) { // Value can be changed if filename changes, but this is the message displayed currently | |
document.body.removeChild(document.body.getElementsByTagName("style")[x]); | |
} | |
} | |
}, false); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment