Less identation.
This commit is contained in:
parent
9f3b9a2127
commit
c2c3a65f99
@ -372,26 +372,25 @@ $.extend $,
|
|||||||
return
|
return
|
||||||
open: (url) ->
|
open: (url) ->
|
||||||
(GM_openInTab or window.open) url, '_blank'
|
(GM_openInTab or window.open) url, '_blank'
|
||||||
queueTask:
|
queueTask: (->
|
||||||
# inspired by https://www.w3.org/Bugs/Public/show_bug.cgi?id=15007
|
# inspired by https://www.w3.org/Bugs/Public/show_bug.cgi?id=15007
|
||||||
(->
|
taskQueue = []
|
||||||
taskQueue = []
|
execTask = ->
|
||||||
execTask = ->
|
task = taskQueue.shift()
|
||||||
task = taskQueue.shift()
|
func = task[0]
|
||||||
func = task[0]
|
args = Array::slice.call task, 1
|
||||||
args = Array::slice.call task, 1
|
func.apply func, args
|
||||||
func.apply func, args
|
if window.MessageChannel
|
||||||
if window.MessageChannel
|
taskChannel = new MessageChannel()
|
||||||
taskChannel = new MessageChannel()
|
taskChannel.port1.onmessage = execTask
|
||||||
taskChannel.port1.onmessage = execTask
|
->
|
||||||
->
|
taskQueue.push arguments
|
||||||
taskQueue.push arguments
|
taskChannel.port2.postMessage null
|
||||||
taskChannel.port2.postMessage null
|
else # XXX Firefox
|
||||||
else # XXX Firefox
|
->
|
||||||
->
|
taskQueue.push arguments
|
||||||
taskQueue.push arguments
|
setTimeout execTask, 0
|
||||||
setTimeout execTask, 0
|
)()
|
||||||
)()
|
|
||||||
globalEval: (code) ->
|
globalEval: (code) ->
|
||||||
script = $.el 'script',
|
script = $.el 'script',
|
||||||
textContent: code
|
textContent: code
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user