franzenzenhofer / f19n-obtrusive-livetest

A sandboxed, extendable testing chrome extension and framework! It runs pre-defined and custom tests on each page that you visit.
https://chrome.google.com/webstore/detail/f19n-obstrusive-live-test/jbnaibigcohjfefpfocphcjeliohhold?hl=en
55 stars 1 forks source link

Google Page Speed Api Key Global Variable #81

Closed franzenzenhofer closed 5 years ago

franzenzenhofer commented 5 years ago

on the settings page there should be a section

Globale Variables

these global varialbes should be available in the context of the rules as varialbes

neuling commented 5 years ago

First implementation is done. Please test if it works for you:

DLvXELwv

Config has a new key called availableGlobalRuleVariables which controls the available global variable inputs and their names.

You can access the global variables/settings inside a rule via this.getGlobals():

const globals = this.getGlobals();
console.log(globals.variables.google_page_speed_insights_key);
franzenzenhofer commented 5 years ago

works as intended