mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-04-28 18:15:47 +02:00
Fix occasional twitter.js crash due to it loading too early
This commit is contained in:
parent
df4c4e443d
commit
6e6312f6d7
@ -1,7 +1,13 @@
|
||||
//
|
||||
// Block: Inject custom CSS and layout into the page.
|
||||
//
|
||||
setTimeout(function(){
|
||||
(function(){
|
||||
//
|
||||
// Function: Inject custom CSS into the page.
|
||||
//
|
||||
var injectCSS = function(){
|
||||
if (!document.head){
|
||||
setTimeout(injectCSS, 25);
|
||||
return;
|
||||
}
|
||||
|
||||
var style = document.createElement("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(".aside p { display: none; }", 0); // hide text below the logout dialog
|
||||
}
|
||||
}, 1);
|
||||
};
|
||||
|
||||
setTimeout(injectCSS, 1);
|
||||
})();
|
||||
|
Loading…
Reference in New Issue
Block a user