User:Asqueella/JEP 107: Difference between revisions

Jump to navigation Jump to search
m
No edit summary
Line 91: Line 91:
** <code id="scriptMod-disable">scriptMod.disable()</code>. Call this to stop a script mod from running on further pages. This does not undo the mod's effects on already loaded pages.
** <code id="scriptMod-disable">scriptMod.disable()</code>. Call this to stop a script mod from running on further pages. This does not undo the mod's effects on already loaded pages.
** <code id="scriptMod-enable">scriptMod.enable()</code>. Enabling a script mod makes it take effect on any matching pages that start to load after the script mod is enabled. Enabling a script mod does not apply it to existing matching pages.
** <code id="scriptMod-enable">scriptMod.enable()</code>. Enabling a script mod makes it take effect on any matching pages that start to load after the script mod is enabled. Enabling a script mod does not apply it to existing matching pages.
 
** ''<code>add/remove/empty</code> from the [[Labs/Jetpack/Reboot/JEP/107|original proposal]] appear inessential, especially if the changes are not applied instantly, as in this proposal.''
* Helper functions available as properties on the <code>ScriptMod</code> constructor
* Helper functions available as properties on the <code>ScriptMod</code> constructor
** <code>ScriptMod.onDOMContentLoaded(''callback'')</code> - when passed as one of the <code>scripts</code> in the <code>ScriptMod</code> constructor options, calls the <code>callback</code> on matching pages when their DOM is available (on the [http://wiki.greasespot.net/DOMContentLoaded <code>DOMContentLoaded</code>] event).
** <code>ScriptMod.onDOMContentLoaded(''callback'')</code> - when passed as one of the <code>scripts</code> in the <code>ScriptMod</code> constructor options, calls the <code>callback</code> on matching pages when their DOM is available (on the [http://wiki.greasespot.net/DOMContentLoaded <code>DOMContentLoaded</code>] event).
** TBD other helpers (insert <style>s, <script>s, etc.)


=== Style mods ===
=== Style mods ===
TBD
TBD
Confirmed users
162

edits

Navigation menu