Labs/Jetpack/Reboot/JEP/107: Difference between revisions

Line 53: Line 53:
#type - (<i>string</i>) The type of modifier being added. Can be 'matches', 'includes', 'styles', or 'script'. If the only argument passed in is an object, Page Mods assumes multiple modifiers will be passed in.
#type - (<i>string</i>) The type of modifier being added. Can be 'matches', 'includes', 'styles', or 'script'. If the only argument passed in is an object, Page Mods assumes multiple modifiers will be passed in.
#data -
#data -
#* matches: (<i>array</i>) an array of URL strings
#* matches: (<i>array</i>) an array of web site resource strings
#* includes: (<i>object</i>) 'script' or 'style' keyed nodes whose values are arrays of asset resource strings
#* includes: (<i>object</i>) 'script' or 'style' keyed nodes whose values are arrays of asset resource strings
#* styles: (<i>string or object</i>) a single string, or an object whose keys are CSS selectors and whose values are objects composed of CSS property keys and values.
#* styles: (<i>string or object</i>) a single string, or an object whose keys are CSS selectors and whose values are objects composed of CSS property keys and values
#* script: (<i>function</i>) a function that will be injected into the page and called. By default, the function is bound with the target document's window object
#* script: (<i>function</i>) a function that will be injected into the page and called. By default, the function is bound with the target document's window object


Line 117: Line 117:
#type - (<i>string</i>) The type of modifier being added. Can be 'matches', 'includes', 'styles', or 'script'. NOTE: If the only argument is an object, Page Mods assumes multiple modifiers will be passed in.
#type - (<i>string</i>) The type of modifier being added. Can be 'matches', 'includes', 'styles', or 'script'. NOTE: If the only argument is an object, Page Mods assumes multiple modifiers will be passed in.
#data -
#data -
#* matches: (<i>array</i>) an array of URL domain strings
#* matches: (<i>array</i>) an array of web site resource strings
#* includes: (<i>array</i>) an array of URL asset strings
#* includes: (<i>object</i>) 'script' or 'style' keyed nodes whose values are arrays of asset resource strings
#* styles: (<i>object</i>) expects object nodes keyed with CSS selector strings, whose values are arrays of the CSS property strings you would like to remove.
#* styles: (<i>object</i>) expects object nodes keyed with CSS selector strings, whose values are arrays of the CSS property strings you would like to remove
#* script: (<i>function reference</i>) removes the script associated with the function reference
#* script: (<i>function reference</i>) removes the script associated with the function reference


1,273

edits