mirror of
https://github.com/stylersnico/librenms.git
synced 2026-08-03 08:01:38 +02:00
test/index.html: minor JS improvements.
Remove unused variables, keep style consistent.
This commit is contained in:
+7
-7
@@ -7,12 +7,12 @@
|
|||||||
<script>
|
<script>
|
||||||
(function() {
|
(function() {
|
||||||
var verMatch = /v=([\w\.]+)/.exec(location.search),
|
var verMatch = /v=([\w\.]+)/.exec(location.search),
|
||||||
version = verMatch && verMatch[1], src;
|
version = verMatch && verMatch[1],
|
||||||
if ( version ) {
|
src;
|
||||||
|
if (version)
|
||||||
src = 'code.jquery.com/jquery-' + version;
|
src = 'code.jquery.com/jquery-' + version;
|
||||||
} else {
|
else
|
||||||
src = 'code.jquery.com/jquery-git';
|
src = 'code.jquery.com/jquery-git';
|
||||||
}
|
|
||||||
document.write('<script src="http://' + src + '.js"><\/script>');
|
document.write('<script src="http://' + src + '.js"><\/script>');
|
||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
@@ -160,12 +160,12 @@
|
|||||||
|
|
||||||
$('#test3')
|
$('#test3')
|
||||||
.hover(function() { log('#test3: mouseover'); }, function() { log('#test3: mouseout'); })
|
.hover(function() { log('#test3: mouseover'); }, function() { log('#test3: mouseout'); })
|
||||||
.mousewheel(function(event, delta, deltaX, deltaY) {
|
.mousewheel(function() {
|
||||||
log('#test3: I should not have been logged');
|
log('#test3: I should not have been logged');
|
||||||
})
|
})
|
||||||
.unmousewheel();
|
.unmousewheel();
|
||||||
|
|
||||||
var testRemoval = function(event, delta, deltaX, deltaY) {
|
var testRemoval = function() {
|
||||||
log('#test4: I should not have been logged');
|
log('#test4: I should not have been logged');
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -203,7 +203,7 @@
|
|||||||
|
|
||||||
function log(msg) {
|
function log(msg) {
|
||||||
$('#logger').append('<p>' + msg + '<\/p>')[0].scrollTop = 999999;
|
$('#logger').append('<p>' + msg + '<\/p>')[0].scrollTop = 999999;
|
||||||
};
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
Reference in New Issue
Block a user