-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsettings.js
executable file
·65 lines (47 loc) · 1.19 KB
/
settings.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
$(function () {
$('#mytabs a').tab('show');
});
//$('#gentab a').click(function (e) {
//e.preventDefault();
//$(this).tab('show');
//})
//$('#advtab a:last').click(function (e) {
// e.preventDefault();
// $(this).tab('show');
//})
window.onload = function() {
document.getElementById('saveset').onclick = function () {
restyle();
}
document.getElementById('clearcache').onclick = function () {
clearcache();
}
document.getElementById('renkey').onclick = function () {
renewkey();
}
};
function restyle() {
var elm = $('p.intro, p.ending');
var s1 = document.getElementById('fontsize');
var size = s1.options[s1.selectedIndex].value;
var s2 = document.getElementById('fontstyle');
var style = s2.options[s2.selectedIndex].value;
alert("Set font style to " + style + " and font size to " +size);
elm.css({'fontSize' : size});
elm.css({'font-family' : style});
//location.reload(true);
$('body').css("fontSize", size);
$('body').css("font-family", style);
};
function clearcache() {
$.ajax({
url:'delete.php',
data:'cache.txt',
method:'GET',
success:function(response){
if (response === 'deleted'){
alert('Deleted !!');
}
}
});
};