haha oh wow, one-liner GM_openInTab
This commit is contained in:
parent
7023841e48
commit
a744036e1f
@ -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 '
|
||||
|
||||
10
4chan_x.js
10
4chan_x.js
@ -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 {\
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user