Passed
Push — master ( 5cb715...24da2d )
by Paul
04:25
created

document.addEventListener(ꞌDOMContentLoadedꞌ)   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
c 0
b 0
f 0
nc 2
nop 0
dl 0
loc 11
rs 9.4285
1
document.addEventListener( 'DOMContentLoaded', function() {
2
	// set text direction class
3
	var widgets = document.querySelectorAll( '.glsr-widget, .glsr-shortcode' );
4
	for( var i = 0; i < widgets.length; i++ ) {
5
		var direction = window.getComputedStyle( widgets[i], null ).getPropertyValue( 'direction' );
6
		widgets[i].classList.add( 'glsr-' + direction );
7
	}
8
	new GLSR.Forms();
0 ignored issues
show
Bug introduced by
The variable GLSR seems to be never declared. If this is a global, consider adding a /** global: GLSR */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
9
	new GLSR.Pagination();
10
	new GLSR.Excerpts();
11
});
12