From 8b7a7cbc813653a3248d6cf3a7779e220957bc85 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Mon, 8 May 2017 21:28:02 +0200 Subject: The great rename: the old ‘website’ is now ‘website-old’, and ‘website2’ is now ‘website’. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- website2/resources/js/main.js | 64 ------------------------------------------- 1 file changed, 64 deletions(-) delete mode 100644 website2/resources/js/main.js (limited to 'website2/resources/js/main.js') diff --git a/website2/resources/js/main.js b/website2/resources/js/main.js deleted file mode 100644 index 4ac490d3..00000000 --- a/website2/resources/js/main.js +++ /dev/null @@ -1,64 +0,0 @@ -"use strict"; - -(function($) { - swfobject.registerObject("player", "9.0.98", "videos/expressInstall.swf"); - - function toKey(href) { - var lnk = "__savedContent_" + href.replace(/\//g, '_'); - if (lnk.substring(lnk.length - 5) === ".html") lnk = lnk.substring(0, lnk.length - 5); - return lnk; - } - - function captureLinkClick() { - var self = $(this); - if (self.data("clc")) return; - var href = self.attr("href"); - self.data("clc", true); - if (!href || href.substr(0, 4) === "http" || href.substr(href.length - 4, 4) === ".xml") return; - self.on("click", function(evt) { - evt.preventDefault(); - var key = toKey(window.location.pathname); - if ($("#" + key).length < 1) { - var d = $("
").attr("id", key).append($("#main-section").contents()).hide(); - $("body").append(d); - } - History.pushState({urlPath: href}, self.text(), href); - }); - } - - function ajaxFeaturePages() { - if (!History.enabled) return; - History.replaceState({urlPath: window.location.pathname}, $("title").text(), History.getState().urlpath); - - $("a").each(captureLinkClick); - - $(window).on("statechange", function() { - var hs = History.getState(); - var u = hs.data.urlPath; - if (u === "/" || u === "") u = "/main.html"; - if (u.substring(u.length - 5) !== ".html") u += ".html"; - var key = toKey(u); - var sc = $("#" + key); - if (sc.length > 0) { - var a = $("#main-section"); - sc.show().attr("id", "main-section").attr("class", "container-fluid main-section"); - a.replaceWith(sc); - } else { - $.ajax({ - url: u, - success: function(response) { - var x = '
'; - var y = '