Remove PSA workaround.

Also this DOMAttrModified actually works.
This commit is contained in:
Mayhem 2013-06-01 17:03:49 +02:00
parent 448273441d
commit 982ec6ecc6
2 changed files with 1 additions and 12 deletions

View File

@ -161,7 +161,6 @@ Main =
attributes: true
attributeFilter: ['href']
else
# XXX this doesn't seem to work?
$.on mainStyleSheet, 'DOMAttrModified', setStyle
initReady: ->

View File

@ -32,17 +32,7 @@ PSAHiding =
href: 'javascript:;'
$.on btn, 'click', PSAHiding.toggle
# XXX remove hiddenPSAs workaround in the future.
items =
hiddenPSA: 0
hiddenPSAs: null
$.get items, ({hiddenPSA, hiddenPSAs}) ->
if hiddenPSAs
$.delete 'hiddenPSAs'
if psa.textContent.replace(/\W+/g, '').toLowerCase() in hiddenPSAs
hiddenPSA = +$.id('globalMessage').dataset.utc
$.set 'hiddenPSA', hiddenPSA
$.get hiddenPSA, 0, ({hiddenPSA}) ->
PSAHiding.sync hiddenPSA
$.before psa, btn
$.rmClass doc, 'hide-announcement'