This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# configure root directory path relative to this file | |
THIS_FOLDER_G = "" | |
if getattr(sys, "frozen", False): | |
# frozen | |
THIS_FOLDER_G = os.path.dirname(sys.executable) | |
else: | |
# unfrozen | |
THIS_FOLDER_G = os.path.dirname(os.path.realpath(__file__)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// -- Function -- | |
function addEventToEach(arrayName, eventType, eventCallback) { | |
var i; | |
for (i = 0; i < arrayName.length; i += 1) { | |
arrayName[i].addEventListener(eventType, eventCallback, false); | |
} | |
return; | |
} |