',
+ '',
+ ''
+].join('');
/******************************************************************************/
@@ -236,11 +240,11 @@ var onBeforeRootFrameRequestHandler = function(details) {
// allows to later check whether the root frame has been unblocked by the
// user, in which case we are able to force a reload using a redirect.
var html = rootFrameReplacement;
- html = html.replace(/{{fontUrl}}/g, httpsb.fontCSSURL);
- html = html.replace(/{{cssURL}}/g, httpsb.noopCSSURL);
+ html = html.replace('{{fontUrl}}', httpsb.fontCSSURL);
+ html = html.replace('{{cssURL}}', httpsb.noopCSSURL);
html = html.replace(/{{hostname}}/g, encodeURIComponent(requestHostname));
- html = html.replace(/{{originalURL}}/g, encodeURIComponent(requestURL));
- html = html.replace(/{{now}}/g, String(Date.now()));
+ html = html.replace('{{originalURL}}', encodeURIComponent(requestURL));
+ html = html.replace('{{now}}', String(Date.now()));
var dataURI = 'data:text/html;base64,' + btoa(html);
// quickProfiler.stop();
@@ -323,10 +327,11 @@ var processRequest = function(httpsb, details) {
// user, in which case we are able to force a reload using a redirect.
if ( requestType === 'sub_frame' ) {
var html = subFrameReplacement
- .replace(/{{fontUrl}}/g, httpsb.fontCSSURL)
+ .replace('{{fontUrl}}', httpsb.fontCSSURL)
.replace(/{{hostname}}/g, requestHostname)
+ .replace('{{frameSrc}}', requestURL)
.replace(/{{subframeColor}}/g, httpsb.userSettings.subframeColor)
- .replace(/{{subframeOpacity}}/g, (httpsb.userSettings.subframeOpacity / 100).toFixed(1));
+ .replace('{{subframeOpacity}}', (httpsb.userSettings.subframeOpacity / 100).toFixed(1));
return { 'redirectUrl': 'data:text/html,' + encodeURIComponent(html) };
}