haha oh wow, one-liner GM_openInTab

This commit is contained in:
James Campos 2010-11-14 23:09:59 -08:00
parent 7023841e48
commit a744036e1f
2 changed files with 2 additions and 16 deletions

View File

@ -51,13 +51,7 @@ AEOS =
style.textContent = css
document.getElementsByTagName('head')[0].appendChild style
window.GM_openInTab = (url) ->
form = document.getElementById 'GM_form'
form.action = url
form.submit()
form = document.createElement 'form'
form.id = 'GM_form'
form.target = '_blank'
document.body.appendChild form
window.open url, "_blank"
#dialog styling
GM_addStyle '

View File

@ -22,7 +22,6 @@
};
AEOS = {
init: function() {
var form;
if (!(typeof GM_deleteValue !== "undefined" && GM_deleteValue !== null)) {
window.GM_setValue = function(name, value) {
value = (typeof value)[0] + value;
@ -52,15 +51,8 @@
return document.getElementsByTagName('head')[0].appendChild(style);
};
window.GM_openInTab = function(url) {
var form;
form = document.getElementById('GM_form');
form.action = url;
return form.submit();
return window.open(url, "_blank");
};
form = document.createElement('form');
form.id = 'GM_form';
form.target = '_blank';
document.body.appendChild(form);
}
return GM_addStyle('\
div.dialog {\