diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..dbe9c82
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+.vscode/
\ No newline at end of file
diff --git a/index.html b/index.html
index 815b94d..2036d0c 100644
--- a/index.html
+++ b/index.html
@@ -336,6 +336,7 @@
+
@@ -504,12 +505,13 @@
//for cloud apps
subAdmins: [],
- webAppURL: "167.172.219.249:8368",
+ webAppURL: "ranchimalltimes-webappserver.duckdns.org",
application: "TestApp",
vectorClock: {},
appObjects: {},
generalData: {},
generalVC: {}
+
}
@@ -9876,24 +9878,28 @@
console.log('woohooo I just clicked')
let columnName = element.id.split('_')[0]
- if (element.classList.value == 'fa fa-thumbs-o-up') {
-
- let articlekey = document.getElementById(columnName).dataset.articlekey
- let mainObj = {
- 'floID': myFloID,
- 'articlekey': articlekey
- }
-
- floCloudAPI.sendGeneralData(JSON.stringify(mainObj), 'test').then((result, mainObj) => {
- element.classList.value = 'fa fa-thumbs-up'
-
- if (document.getElementById(`${columnName}_count`).innerText == '') {
- document.getElementById(`${columnName}_count`).innerText = '1'
- } else {
- document.getElementById(`${columnName}_count`).innerText = parseInt(document.getElementById(
- `${columnName}_count`).innerText) + 1
+ if (typeof mainObj !== 'undefined') {
+ if (element.classList.value == 'fa fa-thumbs-o-up') {
+ let articlekey = document.getElementById(columnName).dataset.articlekey
+ let mainObj = {
+ 'floID': myFloID,
+ 'articlekey': articlekey
}
- })
+
+ floCloudAPI.sendGeneralData(JSON.stringify(mainObj), 'test').then((result, mainObj) => {
+ element.classList.value = 'fa fa-thumbs-up'
+
+ if (document.getElementById(`${columnName}_count`).innerText == '') {
+ document.getElementById(`${columnName}_count`).innerText = '1'
+ } else {
+ document.getElementById(`${columnName}_count`).innerText = parseInt(document.getElementById(
+ `${columnName}_count`).innerText) + 1
+ }
+ })
+ }
+ }
+ else {
+ alert("Please login to vote")
}
}
@@ -9981,6 +9987,12 @@
})
}
+ document.getElementById("user-button").addEventListener("click", function () {
+ floDapps.clearCredentials()
+ alert('Successfully cleared credentials')
+ //location.reload()
+ });
+
function onLoadStartUp() {
//floDapps.addStartUpFunction('Sample', Promised Function)