ghs-jason / Close Empty Wikis

// ==UserScript==
// @name         Close Empty Wikis
// @namespace    http://your.homepage/
// @version      0.3
// @description  enter something useful
// @author       You
// @match        http://wiki.gatehouseads.com/*
// @grant        none
// ==/UserScript==

//url_split=document.URL.split('/');
//url_length=url_split.length-1;
//ad_number=url_split[url_length]; 
//document.body.innerHTML+="<iframe src='https://docs.google.com/a/gatehousemedia.com/forms/d/1HT7B5xlIhM8HzvL-zS_WmVI9y0nvlFNAi2cBzWL6u94/formResponse?ifq&entry.56206050="+ad_number+"&submit=Submit' style='display:hidden;height:1px;width:1px;';></iframe>";


// if "There is currently no text in this page", then close
if(window.find("There is currently no text in this page")) {window.close();}
if(window.find("This webpage is not available")) {window.close();}


//if there is white glove, make big notice.

if(window.find("White glove")){
    	var e = document.createElement('p'); 
    	e.innerHTML = '<div style="position:fixed;left:0;top:0;background-color:white;font-size:2em;color:red;">WHITE GLOVE</div>'; 
        document.body.insertBefore(e, document.body.childNodes[0]);
}