Initial commit
This commit is contained in:
33
Oqtane.Server/wwwroot/js/interop.js
Normal file
33
Oqtane.Server/wwwroot/js/interop.js
Normal file
@ -0,0 +1,33 @@
|
||||
window.interop = {
|
||||
setCookie: function (name, value, days) {
|
||||
var d = new Date();
|
||||
d.setTime(d.getTime() + (days * 24 * 60 * 60 * 1000));
|
||||
var expires = "expires=" + d.toUTCString();
|
||||
document.cookie = name + "=" + value + ";" + expires + ";path=/";
|
||||
},
|
||||
getCookie: function (name) {
|
||||
name = name + "=";
|
||||
var decodedCookie = decodeURIComponent(document.cookie);
|
||||
var ca = decodedCookie.split(';');
|
||||
for (var i = 0; i < ca.length; i++) {
|
||||
var c = ca[i];
|
||||
while (c.charAt(0) === ' ') {
|
||||
c = c.substring(1);
|
||||
}
|
||||
if (c.indexOf(name) === 0) {
|
||||
return c.substring(name.length, c.length);
|
||||
}
|
||||
}
|
||||
return "";
|
||||
},
|
||||
addCSS: function (fileName) {
|
||||
var head = document.head;
|
||||
var link = document.createElement("link");
|
||||
|
||||
link.type = "text/css";
|
||||
link.rel = "stylesheet";
|
||||
link.href = fileName;
|
||||
|
||||
head.appendChild(link);
|
||||
}
|
||||
};
|
5
Oqtane.Server/wwwroot/js/popper.min.js
vendored
Normal file
5
Oqtane.Server/wwwroot/js/popper.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
27
Oqtane.Server/wwwroot/js/site.js
Normal file
27
Oqtane.Server/wwwroot/js/site.js
Normal file
@ -0,0 +1,27 @@
|
||||
/* called by index.html to check if mode is set */
|
||||
function getCookie(name) {
|
||||
name = name + "=";
|
||||
var decodedCookie = decodeURIComponent(document.cookie);
|
||||
var ca = decodedCookie.split(';');
|
||||
for (var i = 0; i < ca.length; i++) {
|
||||
var c = ca[i];
|
||||
while (c.charAt(0) === ' ') {
|
||||
c = c.substring(1);
|
||||
}
|
||||
if (c.indexOf(name) === 0) {
|
||||
return c.substring(name.length, c.length);
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
/* Open when someone clicks on the span element */
|
||||
function openActions() {
|
||||
document.getElementById("actions").style.width = "25%";
|
||||
}
|
||||
|
||||
/* Close when someone clicks on the "x" symbol inside the overlay */
|
||||
function closeActions() {
|
||||
document.getElementById("actions").style.width = "0%";
|
||||
}
|
||||
|
Reference in New Issue
Block a user