mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-03 15:24:00 +01:00
Now only loads & runs if JSHint is available
Script only loads if file is available Processes in function only run if JSHINT is available
This commit is contained in:
@@ -35,7 +35,11 @@ window.onbeforeunload = function() {
|
||||
|
||||
</script>
|
||||
<script language="JavaScript" src="lib/ice-coder.js"></script>
|
||||
<script src="plugins/jshint/jshint.js"></script>
|
||||
<?php
|
||||
if (file_exists(dirname(__FILE__)."/plugins/jshint/jshint.js")) {
|
||||
echo '<script src="plugins/jshint/jshint.js"></script>';
|
||||
}
|
||||
?>
|
||||
</head>
|
||||
|
||||
<body onLoad="<?php
|
||||
|
||||
@@ -1151,7 +1151,7 @@ var ICEcoder = {
|
||||
updateHints: function() {
|
||||
var cM;
|
||||
|
||||
if (top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1].indexOf('.js')>-1) {
|
||||
if ("undefined" != typeof JSHINT && top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1].indexOf('.js')>-1) {
|
||||
cM = ICEcoder.getcMInstance();
|
||||
cM.operation(function(){
|
||||
var widgets = top.ICEcoder['cM'+top.ICEcoder.cMInstances[top.ICEcoder.selectedTab-1]+'widgets'];
|
||||
|
||||
Reference in New Issue
Block a user