| @@ 1-27 (lines=27) @@ | ||
| 1 | function insertFontCSS() { |
|
| 2 | var fontPath = API.extension.getURL(''); |
|
| 3 | var fontCss = ["@font-face {", |
|
| 4 | "font-family: 'FontAwesome';", |
|
| 5 | "src: url('" + fontPath + "fonts/fontawesome-webfont.eot?v=4.7.0');", |
|
| 6 | "src: url('" + fontPath + "fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'), url('" + fontPath + "fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'), url('" + fontPath + "fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'), url('" + fontPath + "fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'), url('" + fontPath + "fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg');", |
|
| 7 | "font-weight: normal;", |
|
| 8 | "font-style: normal;", |
|
| 9 | "}"]; |
|
| 10 | var browser = jQuery.browser; |
|
| 11 | if (window.navigator.userAgent.indexOf('Firefox') !== -1) { |
|
| 12 | fontCss[2] = "src: url('" + fontPath + "fonts/fontawesome-webfont.eot?v=4.7.0');"; |
|
| 13 | fontCss[3] = "src: url('" + fontPath + "fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'), url('" + fontPath + "fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'), url('" + fontPath + "fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'), url('" + fontPath + "fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'), url('" + fontPath + "fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg');"; |
|
| 14 | } |
|
| 15 | var css = fontCss.join(''); |
|
| 16 | var style = document.createElement('style'), |
|
| 17 | head = document.head || document.getElementsByTagName('head')[0]; |
|
| 18 | ||
| 19 | style.type = 'text/css'; |
|
| 20 | if (style.styleSheet) { |
|
| 21 | style.styleSheet.cssText = css; |
|
| 22 | } else { |
|
| 23 | style.appendChild(document.createTextNode(css)); |
|
| 24 | } |
|
| 25 | ||
| 26 | head.appendChild(style); |
|
| 27 | } |
|
| 28 | insertFontCSS(); |
|
| @@ 415-440 (lines=26) @@ | ||
| 412 | $j('#password-toolbar').slideUp(400, function () { |
|
| 413 | $j('#password-toolbar').remove(); |
|
| 414 | }); |
|
| 415 | } |
|
| 416 | ||
| 417 | function insertFontCSS() { |
|
| 418 | var fontPath = API.extension.getURL(''); |
|
| 419 | var fontCss = ["@font-face {", |
|
| 420 | "font-family: 'FontAwesome';", |
|
| 421 | "src: url('" + fontPath + "fonts/fontawesome-webfont.eot?v=4.7.0');", |
|
| 422 | "src: url('" + fontPath + "fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'), url('" + fontPath + "fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'), url('" + fontPath + "fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'), url('" + fontPath + "fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'), url('" + fontPath + "fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg');", |
|
| 423 | "font-weight: normal;", |
|
| 424 | "font-style: normal;", |
|
| 425 | "}"]; |
|
| 426 | if (window.navigator.userAgent.indexOf('Firefox') !== -1) { |
|
| 427 | fontCss[2] = "src: url('" + fontPath + "fonts/fontawesome-webfont.eot?v=4.7.0');"; |
|
| 428 | fontCss[3] = "src: url('" + fontPath + "fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'), url('" + fontPath + "fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'), url('" + fontPath + "fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'), url('" + fontPath + "fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'), url('" + fontPath + "fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg');"; |
|
| 429 | } |
|
| 430 | var css = fontCss.join(''); |
|
| 431 | var style = document.createElement('style'), |
|
| 432 | head = document.head || document.getElementsByTagName('head')[0]; |
|
| 433 | ||
| 434 | style.type = 'text/css'; |
|
| 435 | if (style.styleSheet) { |
|
| 436 | style.styleSheet.cssText = css; |
|
| 437 | } else { |
|
| 438 | style.appendChild(document.createTextNode(css)); |
|
| 439 | } |
|
| 440 | ||
| 441 | head.appendChild(style); |
|
| 442 | } |
|
| 443 | ||