From b55ee5525ef1d493f2df3b71f92203805a85ad9a Mon Sep 17 00:00:00 2001 From: Steve Krouse Date: Tue, 23 Jul 2019 20:41:23 +0000 Subject: [PATCH] started importing modules --- analytics.html | 2 +- create.html | 1107 +----------------------------------------------- create.js | 1070 ++++++++++++++++++++++++++++++++++++++++++++++ index.html | 2 +- teach.html | 2 +- team.html | 520 +---------------------- team.js | 478 +++++++++++++++++++++ user.html | 2 +- utils.js | 26 ++ workflow.html | 4 +- 10 files changed, 1587 insertions(+), 1626 deletions(-) create mode 100644 create.js create mode 100644 team.js create mode 100644 utils.js diff --git a/analytics.html b/analytics.html index 2953c60..c34533f 100644 --- a/analytics.html +++ b/analytics.html @@ -1,7 +1,7 @@ - + diff --git a/create.html b/create.html index 4ce25fe..87e162c 100644 --- a/create.html +++ b/create.html @@ -11,18 +11,12 @@ - - - - - + WoofJS - - @@ -77,7 +71,7 @@ - + - + diff --git a/utils.js b/utils.js new file mode 100644 index 0000000..8057d99 --- /dev/null +++ b/utils.js @@ -0,0 +1,26 @@ +export function debounce(func, wait, immediate) { + var timeout; + return function() { + var context = this, args = arguments; + var later = function() { + timeout = null; + if (!immediate) func.apply(context, args); + }; + var callNow = immediate && !timeout; + clearTimeout(timeout); + timeout = setTimeout(later, wait); + if (callNow) func.apply(context, args); + }; +}; + +export function getID() { + // returns the name of a project, not including the current revision + return window.location.hash.substring(1, window.location.hash.length).split("/")[0]; +} + +export function getIDWithRevision() { + // returns the name of a project, inlcuding the current revision + return window.location.hash.substring(1, window.location.hash.length); +} + +export var currentHash = window.location.hash \ No newline at end of file diff --git a/workflow.html b/workflow.html index 1599291..ce9339a 100644 --- a/workflow.html +++ b/workflow.html @@ -11,7 +11,7 @@ - + @@ -61,7 +61,7 @@ - +