@@ -4,8 +4,6 @@ export function $helperbird_i18n(params, replace = null) {
44 : chrome . i18n . getMessage ( params , replace ) ;
55}
66
7-
8-
97export function getBrowser ( ) {
108 if ( isFirefox ( ) ) {
119 return 'firefox' ;
@@ -25,8 +23,6 @@ export function isFirefox(agent) {
2523 return / f i r e f o x / i. test ( userAgent ) ;
2624}
2725
28-
29-
3026export function isEdge ( agent ) {
3127 let userAgent = isEmpty ( agent ) ? navigator . userAgent : agent ;
3228 return / E d g / i. test ( userAgent ) ;
@@ -46,8 +42,6 @@ export function isChrome(agent, vendor) {
4642 return / C h r o m e / . test ( userAgent ) && / G o o g l e I n c / . test ( vendorAgent ) ;
4743}
4844
49-
50-
5145export function isEmpty ( value ) {
5246 return (
5347 value === undefined ||
@@ -70,54 +64,26 @@ export function removeElementById(id) {
7064 }
7165}
7266
67+ export function injectCssInline ( id , style ) {
68+ let head = document . head || document . getElementsByTagName ( 'head' ) [ 0 ] ;
69+ let sheet = document . createElement ( 'style' ) ;
70+
71+ sheet . setAttribute ( 'id' , id ) ;
7372
73+ sheet . type = 'text/css' ;
7474
75- export function injectCssInline ( id , style ) {
76- let head = document . head || document . getElementsByTagName ( "head" ) [ 0 ] ;
77- let sheet = document . createElement ( "style" ) ;
78-
79- sheet . setAttribute ( "id" , id ) ;
80-
81- sheet . type = "text/css" ;
82-
8375 sheet . appendChild ( document . createTextNode ( style ) ) ;
8476 head . appendChild ( sheet ) ;
85- }
86-
77+ }
8778
88- export function idExists ( id ) {
79+ export function idExists ( id ) {
8980 return document . getElementById ( id ) !== null ;
9081}
9182
92-
93-
94-
9583export function isNull ( value ) {
9684 return value === null ;
9785}
9886
99-
100-
101-
102-
103-
104-
105-
106-
107-
108-
109-
110-
111-
112-
113-
114-
115-
116-
117-
118-
119-
120-
12187export default {
12288 isSafari : isSafari ,
12389 isEdge : isEdge ,
0 commit comments