1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2025-05-22 17:34:06 +02:00

Fix occasional twitter.js crash due to it loading too early

This commit is contained in:
chylex 2017-04-07 00:18:59 +02:00
parent df4c4e443d
commit 6e6312f6d7

View File

@ -1,7 +1,13 @@
// (function(){
// Block: Inject custom CSS and layout into the page. //
// // Function: Inject custom CSS into the page.
setTimeout(function(){ //
var injectCSS = function(){
if (!document.head){
setTimeout(injectCSS, 25);
return;
}
var style = document.createElement("style"); var style = document.createElement("style");
document.head.appendChild(style); document.head.appendChild(style);
@ -22,4 +28,7 @@ setTimeout(function(){
style.sheet.insertRule(".btn.cancel { border: 1px solid #bbc1c5 !important; }", 0); // add border to cancel button style.sheet.insertRule(".btn.cancel { border: 1px solid #bbc1c5 !important; }", 0); // add border to cancel button
style.sheet.insertRule(".aside p { display: none; }", 0); // hide text below the logout dialog style.sheet.insertRule(".aside p { display: none; }", 0); // hide text below the logout dialog
} }
}, 1); };
setTimeout(injectCSS, 1);
})();