summaryrefslogtreecommitdiffstats
path: root/static/script.js
diff options
context:
space:
mode:
authorclsr <clsr@clsr.net>2016-11-11 17:35:39 +0100
committerclsr <clsr@clsr.net>2016-11-11 17:36:02 +0100
commit553bfa1e8d2d9ac3a7ac202065e7adea1fe3142d (patch)
tree5a63196ba5cb242aff8c05e70487fd75db13270d /static/script.js
downloadgomf-web-flup-553bfa1e8d2d9ac3a7ac202065e7adea1fe3142d.tar.gz
gomf-web-flup-553bfa1e8d2d9ac3a7ac202065e7adea1fe3142d.zip
Initial commit; forked from installgen2/Flup
Diffstat (limited to 'static/script.js')
-rw-r--r--static/script.js38
1 files changed, 38 insertions, 0 deletions
diff --git a/static/script.js b/static/script.js
new file mode 100644
index 0000000..ee3260d
--- /dev/null
+++ b/static/script.js
@@ -0,0 +1,38 @@
+function loadImage(url, callback) {
+ var img = new Image();
+ img.src = url;
+
+ img.onload = callback;
+}
+
+(function() {
+ var animeGrill = document.getElementById("anime");
+ var animeEngineTimer = null;
+
+ animeGrill.onmouseover = function() {
+ animeEngineTimer = setTimeout(function() {
+ loadImage("/static/animeengine.png", function() {
+ animeGrill.src = "/static/animeengine.png";
+ });
+ }, 5000);
+ }
+
+ animeGrill.onmouseout = function() {
+ clearTimeout(animeEngineTimer);
+ }
+})();
+
+function uploadPage() {
+ (function() {
+ Array.prototype.forEach.call(document.querySelectorAll(".upload"), (upload) => {
+ var url = upload.querySelector("a").innerHTML;
+
+ upload.innerHTML += ' -- <a href="#" class="clipboard-copy" data-clipboard-text="' + url + '">Copy to clipboard</a>';
+ });
+ })();
+
+ (function() {
+ var btns = document.querySelectorAll(".clipboard-copy");
+ new Clipboard(btns);
+ })();
+}