Skip to content

Instantly share code, notes, and snippets.

@btopro
Created September 17, 2020 21:38
Show Gist options
  • Save btopro/6146b53a5c04534e3278f928baf947b9 to your computer and use it in GitHub Desktop.
Save btopro/6146b53a5c04534e3278f928baf947b9 to your computer and use it in GitHub Desktop.
"Another way out"
javascript:(function()%7Bwindow.__appCDN%3D%22https%3A%2F%2Fcdn.webcomponents.psu.edu%2Fcdn%2F%22%3Bvar%20tag%20%3D%20document.createElement('script')%3Btag.src%3D%22https%3A%2F%2Fcdn.webcomponents.psu.edu%2Fcdn%2Fbuild.js%22%3Bdocument.head.appendChild(tag)%3Bfunction%20tokenHack(e)%20%7BsetTimeout(function()%20%7Bif%20(document.getElementById('content'))%20%7Bvar%20pageContents%20%3D%20document.getElementById('content').innerHTML%3Bvar%20myRegexp%20%3D%20%2F%5C%5Bwc%3A(.*%3F)%5Cs(.*%3F)%5C%2F%5C%5D%2Figm%3Bvar%20match%20%3D%20myRegexp.exec(pageContents)%3Bvar%20replacement%3Bwhile%20(match%20!%3D%20null)%20%7Breplacement%20%3D%20'%3C'%20%2B%20match%5B1%5D%20%2B%20'%20'%20%2B%20match%5B2%5D%20%2B%20'%3E%3C%2F'%20%2B%20match%5B1%5D%20%2B%20'%3E'%3BpageContents%20%3D%20pageContents.replace(match%5B0%5D%2C%20replacement)%3Bmatch%20%3D%20myRegexp.exec(pageContents)%3B%7Ddocument.getElementById('content').innerHTML%20%3D%20pageContents%3Bwindow.WCAutoload.process()%3B%7D%7D%2C%200)%3B%7Dwindow.addEventListener(%22load%22%2C%20tokenHack)%3BsetTimeout(function(e)%20%7Bif%20(window.WCAutoload)%20%7BtokenHack()%3B%7D%7D%2C%20500)%7D)()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment