/
edit.html
executable file
·125 lines (110 loc) · 3.69 KB
/
edit.html
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title id="blog_title"></title>
<script src="config.js"></script>
</head>
<body>
<center>
<div class="loading" id="spinner"></div>
</center>
<div id="all_content" style="display:none">
<header>
<div class="header">
<div class="innerHeader">
<img id="logo" src=""/> <div id="header_title"></div>
</div>
</div>
</header>
<div class="wrapper">
<div class="sidebar">
<div class="sideWidget">
<h2>Generate Database</h2>
<input id="new" type="button" value="Create New" style="display:none"/><br>
<input id="add" type="button" value="Add New Entry" onClick="addEntry()" /><br>
<input id="update" type="button" value="Update Entry" style="display:none"/><br>
<input type="button" value="Generate" onClick="generate()" /><br>
<a href="" id="download" download="database.js">Download it</a>
<a href="" id="rssFeed" download="msites.rss">Download RSS</a>
</div>
<div class="spacer"></div>
<div class="sideWidget">
<h2>Contact Me</h2>
<a href="" id="contact"></a><br>
<a href="https://www.meshedsites.com">MeshedSites HOME</a>
</div>
<div class="spacer"></div>
<div class="sideWidget">
<h2>Archive</h2>
<div id="archive"></div>
</div>
<div class="spacer"></div>
<div class="sideWidget">
<h2>Delete an Entry</h2>
<div id="Entries"></div>
<input type="button" id="delete" value="delete" name="delete"/>
</div>
<div class="spacer"></div>
</div>
<div class="content">
<div class="content_area" id="content_area">
<div class="content_date" id="content_date"></div>
<div class="content_title" id="content_title"></div>
<hr>
<div class="content_text" id="content_text"></div>
<div class="content_markdown" id="content_markdown" style="display:none"></div>
</div>
</div>
</div>
<footer></footer>
</div>
<div id="scripts"></div>
<script>
//Do not edit any of this javascript unless you know what your doing.
if(rss == false){
document.getElementById("rssFeed").style="display:none";
}
append('head', '<link rel="stylesheet" type="text/css" href="'+domain+'/blog.css">');
//thanks to jQuery4u for the following code:
// http://www.jquery4u.com/javascript/dynamically-load-jquery-library-javascript/
edit=true;
(function () {
function loadScript(url, callback) {
var script = document.createElement("script")
script.type = "text/javascript";
if (script.readyState) { //IE
script.onreadystatechange = function () {
if (script.readyState == "loaded" || script.readyState == "complete") {
script.onreadystatechange = null;
callback();
}
};
} else { //Others
script.onload = function () {
callback();
};
}
script.src = url;
document.getElementsByTagName("head")[0].appendChild(script);
}
loadScript(domain+"/jquery.js", function () {
loadScript(domain+"/marked.js", function () {
loadScript(domain+"/" + databaseFile, function () {
loadScript(domain+"/blog.js", function () {
loadScript(domain+"/edit.js", function () {
$("#spinner").hide();
$("#all_content").show();
});
});
});
});
});
})();
function append(tag, tag_data){
var element = document.getElementsByTagName(tag)[0];
element.innerHTML+=tag_data;
}
</script>
</body>
</html>