pile0nades wrote:This code adds a button to Stylish that adds !important to every rule. This is good for installing new styles that don't use !important to persist the rules, or if you don't feel like typing 10, 20, 30 or more letters (10 to each !important flag) when a button press will fill in all of them.
Note: it doesn't work for rules that don't have a semicolon at the end, I don't know how to fix that, sorry. Maybe if I knew some more regexp. Also, this requires the WindowHook code from the first page.
Zoolcar9 wrote:<a href="data:application/x-javascript;charset=utf-8;base64,Ly9UaGlzIHNjcmlwdCB3aWxsIGFkZCAiSGVsbG8sIFdvcmxkISIgYnV0dG9uIG9uIHRoZSB0b29sYmFyDQoNCihmdW5jdGlvbigpIHsNCiAgdmFyIG5ld0J1dHRvbiA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoInRvb2xiYXJidXR0b24iKTsNCiAgbmV3QnV0dG9uLnNldEF0dHJpYnV0ZSgibGFiZWwiLCAiSGVsbG8sIFdvcmxkISIpOw0KICBuZXdCdXR0b24uc2V0QXR0cmlidXRlKCJvbmNvbW1hbmQiLCAiYWxlcnQoJ0hlbGxvLCBXb3JsZCEnKTsiKTsNCiAgbmV3QnV0dG9uLnN0eWxlLmxpc3RTdHlsZUltYWdlID0gInVybChkYXRhOmltYWdlL3BuZztiYXNlNjQsaVZCT1J3MEtHZ29BQUFBTlNVaEVVZ0FBQUJBQUFBQVFBUU1BQUFBbFBXMGlBQUFBRlhSRldIUkRjbVZoZEdsdmJpQlVhVzFsQUFmV0F4c1NLU1VONmlBZUFBQUFCM1JKVFVVSDFnTWJFaTA0MzRGcXN3QUFBQWx3U0ZsekFBQU9kQUFBRG5RQmF5U3oxZ0FBQUFaUVRGUkZBQUFBJTJGJTJGJTJGJTJGcGRtZjNRQUFBQ1ZKUkVGVWVOcGolMkJQJTJCZkFZS21uV0lvMndsQ2swNUJSYjcxTTN5WXolMkZCdFA0Z0JVd1lBaGNVYldjdWhlVDhBQUFBQVNVVk9SSzVDWUlJJTNEKSI7DQogIG5ld0J1dHRvbi5zdHlsZS5wYWRkaW5nID0gIjAiOw0KDQogIHZhciBob21lQnV0dG9uID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoImhvbWUtYnV0dG9uIik7IC8vSG9tZSBidXR0b24NCiAgaG9tZUJ1dHRvbi5wYXJlbnROb2RlLmluc2VydEJlZm9yZShuZXdCdXR0b24sIGhvbWVCdXR0b24ubmV4dFNpYmxpbmcpOyAvL2FkZHMgdGhlIG5ldyBidXR0b24gb24gdGhlIHJpZ2h0IG9mIEhvbWUgYnV0dG9uDQoNCn0pKCk7DQoNCg%3D%3D">Adds a toolbarbutton</a>
It would be cool if buttons were not dependant of another button...
Like Custom Buttons seems to be dead, it would be great if there were a code snippet to add a button in Customize Toolbar window. But maybe it's difficult or too long...
Edit: I've read that pile0nades has tried and he is not so far to find the solution. Good luck for those interested by implementing this feature...
Alice0775,
Great job with the external editor!
I've been playing around with the _tmpdir setting because the temp directory can get loaded up very quickly if the external editor is used a lot.
This setting seems to create a temp directory for you if it doesn't exist.
Would it be possible to add a function near the end of the script that would also delete the temp directory?
I would like to create the temp directory in my profile directory when the external editor is called, then delete it when the editor is closed.
I have updated pile0nades’ Stop-Reload-Goscript (thanks to his help). The Go button is now displayed for blank pages, and it should work fine for both large and small icons.
On themes other than the default, the padding for the Stop or Reload buttons may need to be modified to centre them more ideally within the Go button’s box.
Last edited by Old Dawudd on June 9th, 2007, 8:19 pm, edited 2 times in total.
dougeeebear wrote:Alice0775, Great job with the external editor! I've been playing around with the _tmpdir setting because the temp directory can get loaded up very quickly if the external editor is used a lot. This setting seems to create a temp directory for you if it doesn't exist. Would it be possible to add a function near the end of the script that would also delete the temp directory? I would like to create the temp directory in my profile directory when the external editor is called, then delete it when the editor is closed.
Thanks, Doug
Create the temp directory(named Temp_ExternalEditor) in your profile directory when the external editor is called, then delete it when 'all window' are closed.
I've tweaked the regex of the !important button so it works better now, and cleaned up the code a little. Thanks to feyd on the DevNetwork forums for hints.
is it possible to move the navigation toolbar right above the tabbar ? .. or to create a toolbar above the tabbar and to move all items from the navigation toolbar onto it? i don't want it to go over the sidebar but to stop at the sidebar, just like the tabbar.
thank you, it works. But instead of the windows default background (a blue gradient) which bookmarks toolbar menubar etc have it does now have an all white background. Any idea how to fix that?
<a href="data:application/x-javascript;base64,KGZ1bmN0aW9uKCkgewoKLy8uLi4uLmluc2VydCBXaW5kb3dIb29rIHNuaXBwZXQgaGVyZS4uLi4uLi4uLi8vCgogIFdpbmRvd0hvb2sucmVnaXN0ZXIoImNocm9tZTovL3N0eWxpc2gvY29udGVudC9zdHlsaXNoLWVkaXQueHVsIiwKICAgIGZ1bmN0aW9uKGFXaW5kb3cpIHsKICAgICAgdmFyIENjID0gQ29tcG9uZW50cy5jbGFzc2VzOwogICAgICB2YXIgQ2kgPSBDb21wb25lbnRzLmludGVyZmFjZXM7CiAgICAgIHZhciBEb2MgPSBhV2luZG93LmRvY3VtZW50OwoKICAgICAgYVdpbmRvdy5nZXRGaWxlID0gZnVuY3Rpb24oKSB7CiAgICAgICAgY29uc3QgbnNJRmlsZVBpY2tlciA9IENpLm5zSUZpbGVQaWNrZXI7CiAgICAgICAgdmFyIGZwID0gQ2NbIkBtb3ppbGxhLm9yZy9maWxlcGlja2VyOzEiXQogICAgICAgICAgICAgICAgICAgLmNyZWF0ZUluc3RhbmNlKG5zSUZpbGVQaWNrZXIpOwogICAgICAgIGZwLmluaXQoYVdpbmRvdywgIk9wZW4gRmlsZSIsIG5zSUZpbGVQaWNrZXIubW9kZU9wZW4pOwogICAgICAgIGZwLmFwcGVuZEZpbHRlcnMobnNJRmlsZVBpY2tlci5maWx0ZXJJbWFnZXMpOwogICAgICAgIGZwLmFwcGVuZEZpbHRlcigiQWxsIEZpbGVzIiwgIiouKiIpOwogICAgICAgIGlmIChmcC5zaG93KCkgPT0gbnNJRmlsZVBpY2tlci5yZXR1cm5DYW5jZWwpIHJldHVybjsKICAgICAgICB2YXIgbG9jYWxGaWxlID0gQ2NbIkBtb3ppbGxhLm9yZy9maWxlL2xvY2FsOzEiXQogICAgICAgICAgICAgICA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ICAgcmV0dXJuICJkYXRhOiIgKyBjb250ZW50VHlwZSArICI7YmFzZTY0LCIgKyBlbmNvZGVkOwogICAgICB9CgogICAgICBhV2luZG93Lmluc2VydENvZGVBdENhcmV0ID0gZnVuY3Rpb24oc25pcHBldCkgewogICAgICAgIHZhciBjb2RlRWxlbWVudCA9IERvYy5nZXRFbGVtZW50QnlJZCgiY29kZSIpOwogICAgICAgIHZhciBzZWxlY3Rpb25FbmQgPSBjb2RlRWxlbWVudC5zZWxlY3Rpb25TdGFydCArIHNuaXBwZXQubGVuZ3RoOwogICAgICAgIGNvZGVFbGVtZW50LnZhbHVlID0gY29kZUVsZW1lbnQudmFsdWUuc3Vic3RyaW5nKDAsIGNvZGVFbGVtZW50LnNlbGVjdGlvblN0YXJ0KSArCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzbmlwcGV0ICsgY29kZUVsZW1lbnQudmFsdWUuc3Vic3RyaW5nKGNvZGVFbGVtZW50LnNlbGVjdGlvbkVuZCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29kZUVsZW1lbnQudmFsdWUubGVuZ3RoKTsKICAgICAgICBjb2RlRWxlbWVudC5mb2N1cygpOwogICAgICAgIGNvZGVFbGVtZW50LnNldFNlbGVjdGlvblJhbmdlKHNlbGVjdGlvbkVuZCwgc2VsZWN0aW9uRW5kKTsKICAgICAgfQoKICAgICAgYVdpbmRvdy5pbnNlcnREYXRhVVJJID0gZnVuY3Rpb24oKSB7CiAgICAgICAgdmFyIGZpbGUgPSBhV2luZG93LmdldEZpbGUoKTsKICAgICAgICBpZiAoIWZpbGUpIHJldHVybjsKICAgICAgICB2YXIgZGF0YVVSSSA9IGFXaW5kb3cuZ2VuZXJhdGVEYXRhVVJJKGZpbGUpOwogICAgICAgIGFXaW5kb3cuaW5zZXJ0Q29kZUF0Q2FyZXQoZGF0YVVSSSk7CiAgICAgIH0KCiAgICAgIHZhciBtcCA9IERvYy5nZXRFbGVtZW50c0J5VGFnTmFtZSgibWVudXBvcHVwIilbMF07CiAgICAgIHZhciBtaSA9IG1wLmluc2VydEJlZm9yZShEb2MuY3JlYXRlRWxlbWVudCgibWVudWl0ZW0iKSwgbXAubGFzdENoaWxkKTsKICAgICAgbWkuc2V0QXR0cmlidXRlKCJsYWJlbCIsICJJbnNlcnQgZGF0YTpVUkkgSW1hZ2UgZnJvbSBGaWxlIik7CiAgICAgIG1pLnNldEF0dHJpYnV0ZSgib25jb21tYW5kIiwgImluc2VydERhdGFVUkkoKTsiKTsKICAgIH0KICApOwoKfSkoKTsKCg%3D%3D">Try this</a>. It will add a menu item on "Insert" button.
mozillaZine is an independent Mozilla community and advocacy site. We're not affiliated or endorsed by the Mozilla Corporation but we love them just the same.