Uh oh!
There was an error while loading. Please reload this page.
forked from barbushin/javascript-errors-notifier
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoptions.js
More file actions
Latest commit
64 lines (59 loc) · 1.38 KB
/
Copy pathoptions.js
File metadata and controls
64 lines (59 loc) · 1.38 KB
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
document.addEventListener('DOMContentLoaded',function(){
varoptionsIds=[
'showIcon',
'showPopup',
'showPopupOnMouseOver',
'showColumn',
'showTrace',
'linkStackOverflow',
'linkViewSource',
'relativeErrorUrl',
'ignore404js',
'ignore404css',
'ignore404others',
'ignoreExternal',
'ignoreBlockedByClient',
'ignoreConnectionRefused',
'popupMaxWidth',
'popupMaxHeight'
];
for(variinoptionsIds){
varoption=optionsIds[i];
varvalue=localStorage[option];
varinput=document.getElementById(option);
if(input.type=='checkbox'){
if(value){
input.checked=true;
}
input.onchange=(function(option){
returnfunction(){
localStorage[option]=this.checked ? 1 : '';
}
})(option);
}
else{
input.value=value;
input.onkeyup=(function(option){
returnfunction(){
localStorage[option]=this.value;
}
})(option);
}
}
document.getElementById('close').onclick=function(){
closePopup();
};
if(localStorage['jscrNotified']||localStorage['isRecommended']){
document.getElementById('recommendation').remove();
}
else{
varlinksIds=['openRecommendation','hideRecommendation'];
for(variinlinksIds){
document.getElementById(linksIds[i]).onclick=function(){
localStorage['isRecommended']=3;
closePopup();
returnthis.id=='openRecommendation';
};
}
}
});