luk3yx.github.io/js/guess.js
luk3yx ad3e9d29d6 Formatting changes
• Fix headers when the Ubuntu font isn't installed.
 • Replace double quotes with single quotes in Javascript.
2018-12-08 10:51:13 +13:00

26 lines
579 B
JavaScript

//
// guess.js - Take a guess at what the user wants
//
(function() {
var oldlink = decodeURIComponent(window.location.hash.substr(1));
helpers.params.set('oldlink', oldlink);
helpers.params.set('referrer', document.referrer);
var type = 'jsinfo';
if (helpers.getDomainName(oldlink) == 'youtube.com') {
type = 'youtube-cinema';
} else if (oldlink == 'cookies-accept') {
type = 'cookies-accept';
} else if (oldlink.startsWith('🎄')) {
type = 'card-generator';
} else if (oldlink.startsWith('http')) {
type = 'translate';
}
helpers.loadScript(type);
})();