-
Notifications
You must be signed in to change notification settings - Fork 1
/
bar.js
27 lines (20 loc) · 857 Bytes
/
bar.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
/*
function displayBar() {
if (document.getElementsByTagName('rebar').length > 0) return;
var rebar = document.createElement('rebar');
document.getElementsByTagName('body')[0].appendChild(rebar);
document.getElementsByTagName('html')[0].style.marginTop = '30px';
rebar.innerHTML = '<iframe src="' + safari.extension.baseURI + 'template.html" style="display:-webkit-box; -webkit-box-flex:1; border:0; background-color:transparent;" allowtransparency="true"></iframe>';
window.addEventListener('focus', function(e) {
safari.self.tab.dispatchMessage('gainFocus', null);
}, false);
window.addEventListener('blur', function(e) {
safari.self.tab.dispatchMessage('loseFocus', null);
}, false);
}
*/
if (window === window.top) {
if (link) {
displayBar(link);
}
}