-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathchart.js
42 lines (36 loc) · 1.2 KB
/
chart.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
//function init(){
// var anchors = document.getElementsByTagName('a');
// var i;
// for(i = 0; i < anchors.length; i++){
// var a = anchors[i];
// if(a.getAttribute("href") && !a.target)
// a.target = '_top';
// }
// var forms = document.getElementsByTagName('form');
// for(i = 0; i < forms.length; i++)
// forms[i].target = '_top';
//}
function loadFontStylesheet(){
//<link rel='stylesheet' type='text/css' href='fonts/DoulosSILR.css' />
var windows = [self];
if(parent.frames.inputFrame)
windows.push(parent.frames.inputFrame);
for(var i = 0; i < windows.length; i++){
//console.info(top.frames[i].location, self.location.host)
try {
//console.info(top.frames[i])
var head = windows[i].document.getElementsByTagName('head')[0];
var body = windows[i].document.getElementsByTagName('body')[0];
var link = document.createElement('link');
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = "/projects/ipa-chart/view/fonts/DoulosSILR.css";
head.appendChild(link);
body.style.fontFamily = "IPAChartFallback";
}
catch(e){
console.error(e)
}
}
document.getElementById('loadFontBtn').style.display = 'none';
}