Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Automatically skips the obnoxious "Content warning" on Blogger sites (only those with domains) — and doesn't require a page reload to do so. Winnah. To install using Google Chrome or Grasemonkey, click raw and you'll be prompted to install th
// ==UserScript==
// @name Blogger Content Warning Skip
// @description Automatically skips the content warning on sites without reloading the page
// @match http://**
// ==/UserScript==
var fireEvent = function(obj,evt){
var fireOnThis = obj;
if (document.createEvent) {
var evObj = document.createEvent('MouseEvents');
evObj.initEvent(evt, true, false);
} else if (document.createEventObject) {
fireOnThis.fireEvent('on' + evt);
var overlay = document.getElementById('injected-iframe');
if (overlay) {
var nextSibling = overlay.nextElementSibling;
if (nextSibling.tagName == 'STYLE') nextSibling.parentElement.removeChild(nextSibling);
} else if (window.location.href.indexOf('') == 0) {
fireEvent(document.getElementById('continueButton'), 'click');
Copy link

oddtwelve commented Apr 21, 2012

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment