var isOnline = window.location.hostname.indexOf('github.io') !== -1;
var baseURL = isOnline ? '//rawcdn.githack.com/Alex-D/Trumbowyg/v2.31.0/' : '../../../';
var styleLoadingContainer = document.querySelector('.loading-head');
var scriptLoadingContainer = document.querySelector('.loading-body');
function loadTag(tagToInsert, container, comment, tagForDocumentation) {
'use strict';
document.write(tagToInsert);
var html = '';
if (container.innerHTML.trim().length > 0) {
html = '\n' + container.innerHTML.trim() + '\n';
}
if (comment !== undefined) {
html += '\n<!-- ' + comment + ' -->';
}
html += tagForDocumentation.replace(/',
styleLoadingContainer,
comment,
'\n\n\n'
);
}
function loadScript(scriptPath, comment) {
'use strict';
if (!isOnline) {
scriptPath = scriptPath.replace('.min', '');
}
loadTag(
'',
scriptLoadingContainer,
comment,
'\n\n\n'
);
}
(function($) {
'use strict';
$('a').click(function() {
window.top.location = $(this).attr('href');
return false;
});
})(jQuery);