mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-07-19 22:21:32 +02:00
added jqueryUI to list of prefetched resources, and updated its loader to not use $.getScript(). Updated require.js files to use ?v= in the url argument for cache buster
This commit is contained in:
@@ -466,7 +466,11 @@ app.cacheBuster = null;
|
||||
return callback();
|
||||
}
|
||||
|
||||
$.getScript(config.relative_path + '/vendor/jquery/js/jquery-ui-1.10.4.custom.js', callback);
|
||||
var scriptEl = document.createElement('script');
|
||||
scriptEl.type = 'text/javascript';
|
||||
scriptEl.src = config.relative_path + '/vendor/jquery/js/jquery-ui-1.10.4.custom.js' + (app.cacheBuster ? '?v=' + app.cacheBuster : '');
|
||||
scriptEl.onload = callback;
|
||||
document.head.appendChild(scriptEl);
|
||||
};
|
||||
|
||||
app.showEmailConfirmWarning = function(err) {
|
||||
|
||||
@@ -46,10 +46,13 @@ module.exports = function(Meta) {
|
||||
var defaultLinks = [{
|
||||
rel: "icon",
|
||||
type: "image/x-icon",
|
||||
href: nconf.get('relative_path') + '/favicon.ico?' + Meta.config['cache-buster']
|
||||
href: nconf.get('relative_path') + '/favicon.ico' + (Meta.config['cache-buster'] ? '?' + Meta.config['cache-buster'] : '')
|
||||
}, {
|
||||
rel: "manifest",
|
||||
href: nconf.get('relative_path') + '/manifest.json'
|
||||
}, {
|
||||
rel: "prefetch",
|
||||
href: nconf.get('relative_path') + '/vendor/jquery/js/jquery-ui-1.10.4.custom.js' + (Meta.config['cache-buster'] ? '?v=' + Meta.config['cache-buster'] : '')
|
||||
}];
|
||||
|
||||
// Touch icons for mobile-devices
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
require.config({
|
||||
baseUrl: "{relative_path}/src/modules",
|
||||
waitSeconds: 3,
|
||||
urlArgs: "{config.cache-buster}",
|
||||
urlArgs: "v={config.cache-buster}",
|
||||
paths: {
|
||||
'forum': '../client',
|
||||
'admin': '../admin',
|
||||
|
||||
Reference in New Issue
Block a user