Source for "Best Crosswords"

By James Hewitt
Has no other scripts.


// ==UserScript==
// @name          Best Crosswords
// @namespace     http://youngpup.net/userscripts
// @description	  Clean up page, remove adverts between archive crosswords
// @include       http://www.bestcrosswords.com/bestcrosswords/app*
// ==/UserScript==

function dohtmlediting() {

  var first_input, new_field;

  first_input = document.evaluate('/HTML[1]/BODY[1]/TABLE[1]/TBODY[1]/TR[3]/TD[2]/TABLE[1]/TBODY[1]/TR[1]/TD[1]/TABLE[1]/TBODY[1]/TR[1]/TD[1]/FORM[1]/INPUT[1]', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue;
  new_field = document.createElement('input');
  new_field.setAttribute('name', 'interstitial');
  new_field.setAttribute('value', '0');
  new_field.setAttribute('type', 'hidden');
  first_input.parentNode.insertBefore(new_field, first_input);

  var body, content, new_body;

  body = document.evaluate('/HTML[1]/BODY[1]', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue;
  content = document.evaluate('/HTML[1]/BODY[1]/TABLE[1]/TBODY[1]/TR[3]/TD[2]/TABLE[1]/TBODY[1]/TR[1]/TD[1]/TABLE[1]', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue;
  new_body = document.createElement('body');
  new_body.appendChild(content);
  document.documentElement.replaceChild(new_body, body);
  
};

window.addEventListener("load", function() { dohtmlediting() }, false);//.user.js