Created
February 21, 2018 13:08
-
-
Save IbrahimTanyalcin/158a40798661f423444587d64a28572f to your computer and use it in GitHub Desktop.
taskq_message.js
This file contains hidden or 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 messenger(exports){ | |
/*export the message so it is visible for other functions*/ | |
exports.message = message; | |
/*function for message generator*/ | |
function message(text){ | |
var div = document.createElement("div"); | |
message.count = message.count || 0; | |
message.div = message.div || document.getElementsByClassName("sideCar")[0]; | |
message.div.appendChild(div); | |
div.textContent = ++message.count + ") " + encodeURI(text).replace(/(?:%20)/gi," "); | |
}; | |
}; | |
taskq.push(messenger); | |
}(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment