MCPcopy
hub / github.com/jabbany/CommentCoreLibrary / bindTests

Function bindTests

demo/debugger.js:445–491  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

443};
444
445function bindTests() {
446 for (var test in tests) {
447 try {
448 $(test).addEventListener("click", (function() {
449 var url = tests[test];
450 return function() {
451 if (typeof url === "string") {
452 loadDM(url);
453 } else {
454 loadDM(url.f, url.p);
455 }
456 }
457 })());
458 } catch (e) {}
459 }
460 $("profiler-start").addEventListener("click", function(e) {
461 CCLDBG.reset();
462 CCLDBG.on();
463 cm.filter.setRuntimeFilter(function(cmt) {
464 CCLDBG.profiler();
465 return cmt;
466 });
467 e.preventDefault();
468 });
469 $("video-demo").addEventListener("click", function(e) {
470 var x = prompt("Please give video URL");
471 if (!x) {
472 return;
473 }
474 if (x == "") {
475 $("abpVideo").innerHTML = '<source src="http://content.bitsontherun.com/videos/bkaovAYt-52qL9xLP.mp4" type="video/mp4">' +
476 '<source src="http://content.bitsontherun.com/videos/bkaovAYt-27m5HpIu.webm" type="video/webm">';
477 } else {
478 $("abpVideo").innerHTML = '<source src="' + x + '">';
479 }
480 bindVideo($("abpVideo"), cm);
481 state.mode = 'video';
482 loadDM(tests['test-6']);
483 });
484 $("load-cmt-file").addEventListener("click", function(e) {
485 var x = prompt("Please give comment file URL");
486 if (!x) {
487 return;
488 }
489 loadDM(x);
490 });
491}
492
493function bindResize() {
494 var sX = 0,

Callers 1

debugger.jsFile · 0.85

Calls 4

bindVideoFunction · 0.85
addEventListenerMethod · 0.65
resetMethod · 0.65
$Function · 0.50

Tested by

no test coverage detected