-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathbookmark.js
69 lines (63 loc) · 1.4 KB
/
bookmark.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
;(function(window){
var d,i,c,clickHandler;
if(window.weibotuchuangbyzythum){
return false;
}
if(!window.FormData){
return false;
}
clickHandler = function(){
d.parentNode && document.body.removeChild(d);
c.removeEventListener('click',clickHandler);
d = i = c = null;
delete window.weibotuchuangbyzythum;
}
i = document.createElement('iframe');
i.setAttribute('width','250');
i.setAttribute('height','250');
i.style.cssText = ';border:none;';
i.src = 'http://weibotuchuang.sinaapp.com';
c = document.createElement('div');
c.innerHTML = '关闭';//关闭
c.style.cssText = [
''
,'width:40px'
,'box-shadow:0 0 2px #333'
,'position:absolute'
,'top:0'
,'left:-40px'
,'line-height:25px'
,'padding:0'
,'margin:0'
,'border-radius:0'
,'border:none'
,'background:#515151'
,'z-index:99999'
,'text-align:center'
,'color:#aaa'
,'cursor:pointer'
,''
].join(';');
c.addEventListener('click',clickHandler);
d = document.createElement('div');
d.style.cssText = [
''
,'width:250px'
,'height:250px'
,'box-shadow:0 0 10px #333'
,'position:fixed'
,'top:0'
,'right:0'
,'z-index:1000000'
,'font-family:arial,sans-serif'
,'padding:0'
,'margin:0'
,'border-radius:0'
,'background:#515151'
,''
].join(';');
d.appendChild(c);
d.appendChild(i);
document.body.appendChild(d);
window.weibotuchuangbyzythum = d;
})(window);