Skip to content

Instantly share code, notes, and snippets.

@rsc-awhite
Last active August 30, 2017 04:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rsc-awhite/12c263dd7c6e5750f1b595b01eade36f to your computer and use it in GitHub Desktop.
Save rsc-awhite/12c263dd7c6e5750f1b595b01eade36f to your computer and use it in GitHub Desktop.
// ==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