How to execute GM_addStyle() command with 5 seconds delay?

33 views
Skip to first unread message

Ben Stover

unread,
Apr 16, 2016, 5:13:04 AM4/16/16
to Greasemonkey Users
Assume I want to execute the following statement with a delay of 5 seconds (to allow loading the web page at first completely):

GM_addStyle("#aaa { display: none !important; }");

then the following GM code does NOT work:

window.setTimeout(function() { GM_addStyle("#aaa { display: none !important; }");} ,5000);

Is there another way to deleay execution?




Reply all
Reply to author
Forward
0 new messages