Skip to content

Instantly share code, notes, and snippets.

@sanemat
Created May 5, 2012 15:48
Show Gist options
  • Save sanemat/2603494 to your computer and use it in GitHub Desktop.
Save sanemat/2603494 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Simple Yahoo
// @namespace http://www.example.com/
// @description -
// @include http://www.yahoo.co.jp/*
// ==/UserScript==
// https://gist.github.com/1107277
var load,execute,loadAndExecute;load=function(a,b,c){var d;d=document.createElement("script"),d.setAttribute("src",a),b!=null&&d.addEventListener("load",b),c!=null&&d.addEventListener("error",c),document.body.appendChild(d);return d},execute=function(a){var b,c;typeof a=="function"?b="("+a+")();":b=a,c=document.createElement("script"),c.textContent=b,document.body.appendChild(c);return c},loadAndExecute=function(a,b){return load(a,function(){return execute(b)})};
loadAndExecute("//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js", function() {
$("body").html($("#searchbox"));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment