| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script> | 4 <script> |
| 5 var pref = chrome.experimental.contentSettings.global.referrersEnabled; | 5 var pref = chrome.experimental.contentSettings.global.referrersEnabled; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * Returns whether the |levelOfControl| means that the extension can change the | 8 * Returns whether the |levelOfControl| means that the extension can change the |
| 9 * preference value. | 9 * preference value. |
| 10 * | 10 * |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 pref.onChange.addListener(updateUIFromOnChange); | 78 pref.onChange.addListener(updateUIFromOnChange); |
| 79 } | 79 } |
| 80 | 80 |
| 81 /** | 81 /** |
| 82 * Called from the UI to change the preference value. | 82 * Called from the UI to change the preference value. |
| 83 * | 83 * |
| 84 * @param enabled{boolean} The new preference value. | 84 * @param enabled{boolean} The new preference value. |
| 85 * @param incognito{boolean} Whether the value is specific to incognito mode. | 85 * @param incognito{boolean} Whether the value is specific to incognito mode. |
| 86 */ | 86 */ |
| 87 function setPrefValue(enabled, incognito) { | 87 function setPrefValue(enabled, incognito) { |
| 88 pref.set({'value':enabled, 'incognito': incognito}); | 88 var scope = incognito ? 'incognito_session_only' : 'regular'; |
| 89 pref.set({'value': enabled, 'scope': scope}); |
| 89 } | 90 } |
| 90 | 91 |
| 91 /** | 92 /** |
| 92 * Called from the UI to change whether to use separate settings for | 93 * Called from the UI to change whether to use separate settings for |
| 93 * incognito mode. | 94 * incognito mode. |
| 94 * | 95 * |
| 95 * @param value{boolean} whether to use separate settings for | 96 * @param value{boolean} whether to use separate settings for |
| 96 * incognito mode. | 97 * incognito mode. |
| 97 */ | 98 */ |
| 98 function setUseSeparateIncognitoSettings(value) { | 99 function setUseSeparateIncognitoSettings(value) { |
| (...skipping 20 matching lines...) Expand all Loading... |
| 119 <br> | 120 <br> |
| 120 <input type="checkbox" onclick="setPrefValue(this.checked, true)" id="incognitoV
alue" disabled="disabled"/> Enable referrers in incognito sessions | 121 <input type="checkbox" onclick="setPrefValue(this.checked, true)" id="incognitoV
alue" disabled="disabled"/> Enable referrers in incognito sessions |
| 121 </div> | 122 </div> |
| 122 <div id="incognito-forbidden"> | 123 <div id="incognito-forbidden"> |
| 123 Select "Allow in incognito" to access incognito preferences | 124 Select "Allow in incognito" to access incognito preferences |
| 124 </div> | 125 </div> |
| 125 </div> | 126 </div> |
| 126 | 127 |
| 127 </body> | 128 </body> |
| 128 </html> | 129 </html> |
| OLD | NEW |