| [ |
| { |
| "disabled": false, |
| "target": ".*play.google.com.*", |
| "operator": "block", |
| "destination": "" |
| }, |
| { |
| "disabled": false, |
| "target": ".*csp.withgoogle.com.*", |
| "operator": "block", |
| "destination": "" |
| }, |
| { |
| "disabled": false, |
| "target": ".*www.google-analytics.com.*", |
| "operator": "block", |
| "destination": "" |
| }, |
| { |
| "disabled": false, |
| "target": "(.*)cdn.googlesource.com/polygerrit_ui/[0-9.]+/elements/.*", |
| "operator": "redirect", |
| "destination": "http://localhost:8081/elements/gr-app.js" |
| }, |
| { |
| "disabled": false, |
| "target": "(.*)cdn.googlesource.com/polygerrit_ui/[0-9.]+/styles/", |
| "operator": "redirect", |
| "destination": "http://localhost:8081/styles/" |
| }, |
| { |
| "disabled": false, |
| "target": ".*", |
| "operator": "addReqHeader", |
| "destination": "X-TEST-ORIGIN=gerrit-fe-dev-helper" |
| }, |
| { |
| "disabled": false, |
| "target": "", |
| "operator": "injectJSCode", |
| "destination": "let helperTip = document.createElement('span'); helperTip.innerHTML = `Gerrit dev helper is enabled`; helperTip.style = 'color: white;font-weight:bold;padding:10px;z-index:10000;display:block;position:fixed;bottom:0;right:0;background-color:red;'; let _errorLog = console.error; let numOfErrors = 0; console.error = (...args) => { _errorLog.call(console, ...args); numOfErrors++; helperTip.innerHTML = `Gerrit dev helper is enabled (${numOfErrors} js errors)`; }; document.body.appendChild(helperTip);" |
| } |
| ] |