Skip to content

Instantly share code, notes, and snippets.

@IbrahimTanyalcin
Created February 21, 2018 13:08
Show Gist options
  • Save IbrahimTanyalcin/158a40798661f423444587d64a28572f to your computer and use it in GitHub Desktop.
Save IbrahimTanyalcin/158a40798661f423444587d64a28572f to your computer and use it in GitHub Desktop.
taskq_message.js
!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