|
29 | 29 |
|
30 | 30 | /******************************************************************************/ |
31 | 31 |
|
| 32 | +var popupFontSize = vAPI.localStorage.getItem('popupFontSize'); |
| 33 | +if ( typeof popupFontSize === 'string' && popupFontSize !== 'unset' ) { |
| 34 | + document.body.style.setProperty('font-size', popupFontSize); |
| 35 | +} |
| 36 | + |
32 | 37 | // Ensure the popup is properly sized as soon as possible. It is assume the DOM |
33 | 38 | // content is ready at this point, which should be the case given where this |
34 | 39 | // script file is included in the HTML file. |
@@ -100,7 +105,6 @@ var rowsToRecycle = uDom(); |
100 | 105 | var cachedPopupHash = ''; |
101 | 106 | var statsStr = vAPI.i18n('popupBlockedStats'); |
102 | 107 | var domainsHitStr = vAPI.i18n('popupHitDomainCount'); |
103 | | -var reNetworkRelatedURL = /^(?:ftps?|https?|wss?):\/\//; |
104 | 108 |
|
105 | 109 | /******************************************************************************/ |
106 | 110 |
|
@@ -386,6 +390,17 @@ var renderPrivacyExposure = function() { |
386 | 390 | // Assume everything has to be done incrementally. |
387 | 391 |
|
388 | 392 | var renderPopup = function() { |
| 393 | + if ( popupData.fontSize !== popupFontSize ) { |
| 394 | + popupFontSize = popupData.fontSize; |
| 395 | + if ( popupFontSize !== 'unset' ) { |
| 396 | + document.body.style.setProperty('font-size', popupFontSize); |
| 397 | + vAPI.localStorage.setItem('popupFontSize', popupFontSize); |
| 398 | + } else { |
| 399 | + document.body.style.removeProperty('font-size'); |
| 400 | + vAPI.localStorage.removeItem('popupFontSize'); |
| 401 | + } |
| 402 | + } |
| 403 | + |
389 | 404 | if ( popupData.tabTitle ) { |
390 | 405 | document.title = popupData.appName + ' - ' + popupData.tabTitle; |
391 | 406 | } |
|
0 commit comments