-
Notifications
You must be signed in to change notification settings - Fork 1
/
more.js
75 lines (58 loc) · 2.7 KB
/
more.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
function ChangeClass() {
console.log("Working");
const classExists = document.getElementsByClassName('col-lg-3').length > 0;
if (classExists) {
var x = 1
console.log("Exist");
const nodeList = document.querySelectorAll("div .col-md-12");
for (let i = 0; i < nodeList.length; i++) {
nodeList[i].classList.remove('col-lg-3');
}
document.getElementById("changeView__").innerHTML = "<i class='far fa-credit-card'></i>";
} else {
var x = 0;
console.log("Do not exist");
const nodeList = document.querySelectorAll("div .col-md-12");
for (let i = 0; i < nodeList.length; i++) {
nodeList[i].classList.add('col-lg-3');
}
document.getElementById("changeView__").innerHTML = "<i class='fas fa-list'></i>";
}
}
function github() {
window.open("https://enally.in", target = "_blank");
window.open("https://github.com/03prashantpk/", target = "_blank");
}
function LiveRun() {
window.open("https://enally.in/live/taskorg/", target = "_blank");
}
setTimeout(function() {
const badge = document.getElementsByClassName('badge').length > 0;
if (badge) {
const nodeList = document.querySelectorAll(".badge");
for (let i = 0; i < nodeList.length; i++) {
nodeList[i].classList.remove('bg-primary');
}
}
console.log("Removing Bg Color");
}, 300)
let addMoreButton = () => {
const addMoreButton_ = document.createElement('div');
addMoreButton_.innerHTML =
`
<button class="btn btn-primary addMoreButton" title="Add Task" type="submit" data-bs-toggle="modal" data-bs-target="#addNewModal" ><i class="fa fa-plus mx-2"></i></button>
<button class="btn btn-primary viewButton" title="Change View" id="changeView__" onclick="ChangeClass()" type="submit"><i class='fas fa-list'></i></button>
<button class="btn btn-primary author" title="Github" id="author" onclick="github()" type="submit"><i class="fas fa-user-plus"></i></button>
<button class="btn btn-primary liveRun" title="Live Run" id="liveRun" onclick="LiveRun()" type="submit"><i class="fas fa-globe-europe"></i></button>
<div class="passwordForm" hidden>
<img src='https://cdn-icons-png.flaticon.com/512/6587/6587395.png'>
<h3>Enter Password</h3>
<input id="password" type="password" placeholder="password">
<button id="setpass" style="display: none;" onclick="setPassword()">Set Password</button>
<button id="loginbtn" style="display: none;" onclick="logg()">Login</button>
</div>
<p id="credit"> D & D - Prashant Kumar</p>
`;
document.body.appendChild(addMoreButton_);
}
setTimeout(addMoreButton(), 3000);