From 8164c6f2ee0407dbcb13087b7fea5e058d46c117 Mon Sep 17 00:00:00 2001 From: bluesaxman Date: Sun, 21 Apr 2019 10:25:45 -0600 Subject: [PATCH] Add 'base.js' --- base.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 base.js diff --git a/base.js b/base.js new file mode 100644 index 0000000..87df304 --- /dev/null +++ b/base.js @@ -0,0 +1,22 @@ +window.api_url = ""; // Webfacing URL to imapi.pl + +function getWidget(type) { + var path = window.api_url+"?l!j!"; + if ("thumbnail" == type) { + if (typeof getImage !== "function") {getJavascript(path+"getImage");} + if (typeof showImage !== "function") {getJavascript(path+"showImage");} + if (typeof imageViewElements !== "function") {getJavascript(path+"imageViewElements");} + } + if ("gallery" == type) { + if (typeof getGalleries !== "function") {getJavascript(path+"getGalleries");} + if (typeof putGalleries !== "function") {getJavascript(path+"putGalleries");} + if (typeof listGalleries !== "function") {getJavascript(path+"listGalleries");} + if (typeof initGalery !== "function") {getJavascript(path+"initGalery");} + if (typeof getImageList !== "function") {getJavascript(path+"getImageList");} + if (typeof putImageList !== "function") {getJavascript(path+"putImageList");} + if (typeof ImageListSelection !== "function") {getJavascript(path+"ImageListSelection");} + if (typeof initImage !== "function") {getJavascript(path+"initImage");} + if (typeof imageViewElements !== "function") {getJavascript(path+"imageViewElements");} + if (typeof refreshImage !== "function") {getJavascript(path+"refreshImage");} + } +} \ No newline at end of file