Don't use titles for adblock styles, WebKit only loads one with a title

This commit is contained in:
Alexander Butenko 2009-12-22 01:05:54 +01:00 committed by Christian Dywan
parent 1c424106f1
commit 9ab1040e5f

View file

@ -58,15 +58,9 @@ formhistory_prepare_js ()
"%s"
"window.addEventListener ('DOMContentLoaded',"
"function () {"
" var styles = document.getElementsByTagName('style');"
" for (i=0; i<styles.length; i++) {"
" if (styles[i].getAttribute('title') == 'formhistory')"
" return;"
" }"
" initSuggestions ();"
" var mystyle = document.createElement('style');"
" mystyle.setAttribute('type', 'text/css');"
" mystyle.setAttribute('title', 'formhistory');"
" mystyle.appendChild(document.createTextNode('%s'));"
" var head = document.getElementsByTagName('head')[0];"
" if (head) head.appendChild(mystyle);"