modules/rentbits/widgets/rb-widgets.js   A
last analyzed

Complexity

Total Complexity 2
Complexity/F 1

Size

Lines of Code 13
Function Count 2

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 1 Features 0
Metric Value
cc 0
nc 1
dl 0
loc 13
rs 10
c 2
b 1
f 0
wmc 2
mnd 0
bc 2
fnc 2
bpm 1
cpm 1
noi 1
1
function makeRbFrame() {
2
	rb_data.forEach(function(rb_widget, index) {
0 ignored issues
show
Bug introduced by
The variable rb_data seems to be never declared. If this is a global, consider adding a /** global: rb_data */ 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...
3
		var rb_ifrm = document.createElement( "IFRAME" );
4
		var rb_src_domain = "&srcd=" + document.location.href.replace( /^[a-z:]+\/\//,"" ).replace( /\/.*/,"" );
5
		rb_ifrm.setAttribute( "src", rb_widget.url + rb_src_domain );
6
		rb_ifrm.style.width = rb_widget.width;
7
		rb_ifrm.style.height = rb_widget.height;
8
		rb_ifrm.style.border = "none";
9
		rb_ifrm.frameBorder = "0px";
10
		document.getElementById( 'rb-widget-' + index ).appendChild( rb_ifrm );
11
	});
12
}
13
makeRbFrame();
14