User:Asqueella/JEP 107: Difference between revisions

m
no edit summary
mNo edit summary
mNo edit summary
Line 1: Line 1:
This is an edited version of [[Labs/Jetpack/Reboot/JEP/107]].
This is an edited version of [[Labs/Jetpack/Reboot/JEP/107]].


== Page Mods ==
= Page Mods =
There are two common ways to modify web pages from the browser:
There are two common ways to modify web pages from the browser:
* by specifying custom CSS to apply to specific pages, sites, or all web content. (This is what [https://addons.mozilla.org/en-US/firefox/addon/2108 Stylish extension] does.)
* by specifying custom CSS to apply to specific pages, sites, or all web content. (This is what [https://addons.mozilla.org/en-US/firefox/addon/2108 Stylish extension] does.)
Line 12: Line 12:
'''ISSUE''': Therefore, it might make sense to provide separate APIs for these two types of modifications. We'll call them "Script mods" and "Style mods" below.
'''ISSUE''': Therefore, it might make sense to provide separate APIs for these two types of modifications. We'll call them "Script mods" and "Style mods" below.


==== Script Mods ====
== API ==
=== Script Mods ===
<pre class="brush:js;">
<pre class="brush:js;">
var ScriptMod = require("script-mod").ScriptMod;
var ScriptMod = require("script-mod").ScriptMod;
Line 33: Line 34:
});
});
</pre>
</pre>
=== Style mods ===
TBD


== Use Cases ==
== Use Cases ==
Confirmed users
161

edits