add optional cache-busting to favicon
This commit is contained in:
parent
48fe3ef841
commit
3b20dcd435
@ -1,4 +1,11 @@
|
|||||||
(function () {
|
(function () {
|
||||||
|
var Mod = function (ApiConfig) {
|
||||||
|
var requireConf;
|
||||||
|
if (ApiConfig && ApiConfig.requireConf) {
|
||||||
|
requireConf = ApiConfig.requireConf;
|
||||||
|
}
|
||||||
|
var urlArgs = typeof(requireConf.urlArgs) === 'string'? '?' + urlArgs: '';
|
||||||
|
|
||||||
var Module = {};
|
var Module = {};
|
||||||
|
|
||||||
var isSupported = Module.isSupported = function () {
|
var isSupported = Module.isSupported = function () {
|
||||||
@ -41,8 +48,8 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var DEFAULT_MAIN = '/customize/main-favicon.png';
|
var DEFAULT_MAIN = '/customize/main-favicon.png' + urlArgs;
|
||||||
var DEFAULT_ALT = '/customize/alt-favicon.png';
|
var DEFAULT_ALT = '/customize/alt-favicon.png' + urlArgs;
|
||||||
|
|
||||||
var createFavicon = function () {
|
var createFavicon = function () {
|
||||||
console.log("creating favicon");
|
console.log("creating favicon");
|
||||||
@ -110,13 +117,13 @@
|
|||||||
cancel: cancel,
|
cancel: cancel,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
return Module;
|
||||||
|
};
|
||||||
|
|
||||||
if (typeof(module) !== 'undefined' && module.exports) {
|
if (typeof(module) !== 'undefined' && module.exports) {
|
||||||
module.exports = Module;
|
module.exports = Module;
|
||||||
} else if ((typeof(define) !== 'undefined' && define !== null) && (define.amd !== null)) {
|
} else if ((typeof(define) !== 'undefined' && define !== null) && (define.amd !== null)) {
|
||||||
define(function () {
|
define(['/api/config'], Mod);
|
||||||
return Module;
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
window.Visible = Module;
|
window.Visible = Module;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user