| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script> | 4 <script> |
| 5 var cs = chrome.experimental.contentSettings; | 5 var cs = chrome.experimental.contentSettings; |
| 6 var pref = cs.misc.enableReferrers; | 6 var pref = cs.misc.enableReferrers; |
| 7 | 7 |
| 8 /** | 8 /** |
| 9 * Returns whether the |levelOfControl| means that the extension can change the | 9 * Returns whether the |levelOfControl| means that the extension can change the |
| 10 * preference value. | 10 * preference value. |
| 11 * | 11 * |
| 12 * @param levelOfControl{string} | 12 * @param levelOfControl{string} |
| 13 */ | 13 */ |
| 14 function settingIsControllable(levelOfControl) { | 14 function settingIsControllable(levelOfControl) { |
| 15 return (levelOfControl == "ControllableByThisExtension" || | 15 return (levelOfControl == "controllable_by_this_extension" || |
| 16 levelOfControl == "ControlledByThisExtension"); | 16 levelOfControl == "controlled_by_this_extension"); |
| 17 } | 17 } |
| 18 | 18 |
| 19 /** | 19 /** |
| 20 * Updates the UI to reflect the state of the preference. | 20 * Updates the UI to reflect the state of the preference. |
| 21 * | 21 * |
| 22 * @param settings{object} A settings object, as returned from |get()| or the | 22 * @param settings{object} A settings object, as returned from |get()| or the |
| 23 * |onchange| event. | 23 * |onchange| event. |
| 24 */ | 24 */ |
| 25 function updateUI(settings) { | 25 function updateUI(settings) { |
| 26 var disableUI = !settingIsControllable(settings.levelOfControl); | 26 var disableUI = !settingIsControllable(settings.levelOfControl); |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 <input type="checkbox" onclick="setUseSeparateIncognitoSettings(this.checked)" i
d="useSeparateIncognitoSettings" /> Use separate setting for incognito mode: | 119 <input type="checkbox" onclick="setUseSeparateIncognitoSettings(this.checked)" i
d="useSeparateIncognitoSettings" /> Use separate setting for incognito mode: |
| 120 <br> | 120 <br> |
| 121 <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 |
| 122 </div> | 122 </div> |
| 123 <div id="incognito-forbidden"> | 123 <div id="incognito-forbidden"> |
| 124 Select "Allow in incognito" to access incognito preferences | 124 Select "Allow in incognito" to access incognito preferences |
| 125 </div> | 125 </div> |
| 126 </div> | 126 </div> |
| 127 | 127 |
| 128 </body> | 128 </body> |
| 129 </html> | 129 </html> |
| OLD | NEW |