summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Legler <alex@a3li.li>2015-08-14 20:11:52 +0200
committerAlex Legler <alex@a3li.li>2015-08-14 20:11:52 +0200
commit406658484ac434d75d47d082a907937aa2366ad1 (patch)
tree5071d7e22c8e43837be6912edcf726522c1c80a6 /SemanticResultFormats/formats/Exhibit/exhibit/scripts/persistence.js
parentIgnore Widget's compiled templates (diff)
downloadextensions-406658484ac434d75d47d082a907937aa2366ad1.tar.gz
extensions-406658484ac434d75d47d082a907937aa2366ad1.tar.bz2
extensions-406658484ac434d75d47d082a907937aa2366ad1.zip
Remove extensions that will be pulled in via composer
Diffstat (limited to 'SemanticResultFormats/formats/Exhibit/exhibit/scripts/persistence.js')
-rw-r--r--SemanticResultFormats/formats/Exhibit/exhibit/scripts/persistence.js83
1 files changed, 0 insertions, 83 deletions
diff --git a/SemanticResultFormats/formats/Exhibit/exhibit/scripts/persistence.js b/SemanticResultFormats/formats/Exhibit/exhibit/scripts/persistence.js
deleted file mode 100644
index c0a37116..00000000
--- a/SemanticResultFormats/formats/Exhibit/exhibit/scripts/persistence.js
+++ /dev/null
@@ -1,83 +0,0 @@
-/*======================================================================
- * Persistence Utility Functions
- *======================================================================
- */
-Exhibit.Persistence = {};
-
-Exhibit.Persistence.getBaseURL = function(url) {
- // HACK: for some unknown reason Safari keeps throwing
- // TypeError: no default value
- // when this function is called from the RDFa importer. So I put a try catch here.
- try {
- if (url.indexOf("://") < 0) {
- var url2 = Exhibit.Persistence.getBaseURL(document.location.href);
- if (url.substr(0,1) == "/") {
- url = url2.substr(0, url2.indexOf("/", url2.indexOf("://") + 3)) + url;
- } else {
- url = url2 + url;
- }
- }
-
- var i = url.lastIndexOf("/");
- if (i < 0) {
- return "";
- } else {
- return url.substr(0, i+1);
- }
- } catch (e) {
- return url;
- }
-};
-
-Exhibit.Persistence.resolveURL = function(url) {
- if (url.indexOf("://") < 0) {
- var url2 = Exhibit.Persistence.getBaseURL(document.location.href);
- if (url.substr(0,1) == "/") {
- url = url2.substr(0, url2.indexOf("/", url2.indexOf("://") + 3)) + url;
- } else {
- url = url2 + url;
- }
- }
- return url;
-};
-
-Exhibit.Persistence.getURLWithoutQueryAndHash = function() {
- var url;
- if ("_urlWithoutQueryAndHash" in Exhibit) {
- url = Exhibit.Persistence._urlWithoutQueryAndHash;
- } else {
- url = document.location.href;
-
- var hash = url.indexOf("#");
- var question = url.indexOf("?");
- if (question >= 0) {
- url = url.substr(0, question);
- } else if (hash >= 0) {
- url = url.substr(0, hash);
- }
-
- Exhibit.Persistence._urlWithoutQueryAndHash = url;
- }
- return url;
-};
-
-Exhibit.Persistence.getURLWithoutQuery = function() {
- var url;
- if ("_urlWithoutQuery" in Exhibit.Persistence) {
- url = Exhibit.Persistence._urlWithoutQuery;
- } else {
- url = document.location.href;
-
- var question = url.indexOf("?");
- if (question >= 0) {
- url = url.substr(0, question);
- }
-
- Exhibit.Persistence._urlWithoutQuery = url;
- }
- return url;
-};
-
-Exhibit.Persistence.getItemLink = function(itemID) {
- return Exhibit.Persistence.getURLWithoutQueryAndHash() + "#" + encodeURIComponent(itemID);
-}; \ No newline at end of file