mirror of
https://github.com/kiwix/kiwix-js-pwa.git
synced 2025-09-12 22:09:43 -04:00
Correct location string
Former-commit-id: 65a4c1e9a59bfab78ce0a374b24cd270a52f8a30 [formerly 6d6554b8576ad72b09c4649c1b7bcffe157034c3] Former-commit-id: d5ad4c5121bcb5e665d98817319bdfaa1c7f1c17
This commit is contained in:
parent
5eb89721ff
commit
130b423c26
@ -1130,7 +1130,7 @@ define(['jquery', 'zimArchiveLoader', 'uiUtil', 'util', 'utf8', 'images', 'cooki
|
|||||||
var determinedWikiTheme = params.cssTheme == 'auto' ? cssUIThemeGetOrSet('auto', true) : params.cssTheme;
|
var determinedWikiTheme = params.cssTheme == 'auto' ? cssUIThemeGetOrSet('auto', true) : params.cssTheme;
|
||||||
var breakoutLink = doc.getElementById('breakoutLink');
|
var breakoutLink = doc.getElementById('breakoutLink');
|
||||||
// Construct an absolute reference becuase Service Worker needs this
|
// Construct an absolute reference becuase Service Worker needs this
|
||||||
var prefix = document.location.origin + document.location.pathname.replace(/\/[^/]*$/, '');
|
var prefix = (window.location.protocol + '//' + window.location.host + window.location.pathname).replace(/\/[^/]*$/, '');
|
||||||
if (determinedWikiTheme != "light") {
|
if (determinedWikiTheme != "light") {
|
||||||
var link = doc.createElement("link");
|
var link = doc.createElement("link");
|
||||||
link.setAttribute("rel", "stylesheet");
|
link.setAttribute("rel", "stylesheet");
|
||||||
@ -2838,7 +2838,7 @@ define(['jquery', 'zimArchiveLoader', 'uiUtil', 'util', 'utf8', 'images', 'cooki
|
|||||||
|
|
||||||
//Preload stylesheets [kiwix-js #149]
|
//Preload stylesheets [kiwix-js #149]
|
||||||
//Set up blobArray of promises
|
//Set up blobArray of promises
|
||||||
var prefix = document.location.origin + document.location.pathname.replace(/\/[^/]*$/, '');
|
var prefix = (window.location.protocol + '//' + window.location.host + window.location.pathname).replace(/\/[^/]*$/, '');
|
||||||
var cssArray = htmlArticle.match(regexpSheetHref);
|
var cssArray = htmlArticle.match(regexpSheetHref);
|
||||||
var blobArray = [];
|
var blobArray = [];
|
||||||
var cssSource = params.cssSource;
|
var cssSource = params.cssSource;
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
define(['util', 'uiUtil'], function (util, uiUtil) {
|
define(['util', 'uiUtil'], function (util, uiUtil) {
|
||||||
var prefix = document.location.origin + document.location.pathname.replace(/\/[^/]*$/, '/');
|
var prefix = (window.location.protocol + '//' + window.location.host + window.location.pathname).replace(/\/[^/]*$/, '/');
|
||||||
/* zl = zimLink; zim = zimType; cc = cssCache; cs = cssSource; i] */
|
/* zl = zimLink; zim = zimType; cc = cssCache; cs = cssSource; i] */
|
||||||
function filterCSS(zl, zim, cc, cs, i) {
|
function filterCSS(zl, zim, cc, cs, i) {
|
||||||
var rtnFunction = "injectCSS";
|
var rtnFunction = "injectCSS";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user