forked from danielgavrilov/WebFontPicker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbookmarklet-source.js
More file actions
32 lines (23 loc) · 849 Bytes
/
bookmarklet-source.js
File metadata and controls
32 lines (23 loc) · 849 Bytes
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
javascript:(function(){
var WFP = window.WFP = window.WFP || {},
protocol = window.location.protocol === 'https:' ? 'https:' : 'http:';
WFP.bookmarklet = 3;
WFP.Picker && WFP.Picker.show();
if (WFP.attached || WFP.Picker) return;
function loadStylesheet(url) {
var link = document.createElement('link');
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = url;
document.head.appendChild(link);
}
function loadScript(url) {
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = url;
document.head.appendChild(script);
}
loadStylesheet(protocol + '//gavrilov.co.uk/wfp/WFP.css');
loadScript(protocol + '//gavrilov.co.uk/wfp/WFP.full.min.js');
WFP.attached = true;
})();