Skip to content

Instantly share code, notes, and snippets.

@rummik
Last active November 9, 2016 16:30
Show Gist options
  • Select an option

  • Save rummik/5ab06708dd2f99fea84f95a6b302f340 to your computer and use it in GitHub Desktop.

Select an option

Save rummik/5ab06708dd2f99fea84f95a6b302f340 to your computer and use it in GitHub Desktop.
Add HTML5 sandboxing to Comic Rocket's <iframe>
// ==UserScript==
// @name Comic Rocket Sandbox Fix
// @namespace http://rummik.com/
// @version 1.0
// @description Add sandbox attributes to embedded comic iframes to prevent escaping
// @author rummik
// @match http://www.comic-rocket.com/*
// @grant Public Domain / WTFPL
// ==/UserScript==
document
.querySelector('#serialpagebody iframe')
.setAttribute('sandbox', 'allow-scripts allow-forms allow-same-origin');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment