Diskussionen » Entwicklungsanfragen
Script request, extended Wireclub emoticons panel.
// ==UserScript==
// @name wireclub emoticons
// @description Adds the hidden emoticons in wireclub to the emoticons menu
// @version 1
// @namespace https://greasyfork.org/users/424058
// @icon https://www.google.com/s2/favicons?sz=64&domain=www.wireclub.com
// @match https://www.wireclub.com/*
// @require https://cdnjs.cloudflare.com/ajax/libs/arrive/2.4.1/arrive.min.js#sha512-wkU3qYWjenbM+t2cmvw2ADRRh4opbOYBjkhrPGHV7M6dcE/TR0oKpoDkWXfUs3HrulI2JFuTQyqPLRih1V54EQ==
// @run-at document-body
// @grant none
// ==/UserScript==
/* global $ */
(function() {
'use strict';
const emoticonsList = [
'angel', 'ashamed', 'agree', 'area51', 'bacondance', 'banana', 'banghead',
'banned', 'bigeyes', 'biggrin', 'bighug', 'blahblah', 'bolt', 'bowdown',
'broken', 'bsflag', 'burn', 'cat', 'cheer', 'confused', 'cries', 'cube',
'cupid', 'cylon', 'dance', 'deal', 'deadhorse', 'devil', 'dog', 'doh',
'dramacorn', 'dramaqueen', 'drool', 'drunk', 'duel', 'duh', 'embarrassed',
'evilbanana', 'eyebrow', 'eyeroll', 'excited', 'facepalm', 'fishslap',
'flirty', 'friendkiss', 'flowers', 'goodluck', 'haha', 'happy', 'heart',
'hug', 'headspin', 'hysterics', 'highfive', 'hides', 'inlove', 'laugh',
'lmfao', 'love', 'madbeating', 'mangapunksai', 'ninja', 'ohnoes', 'openarms',
'outrage', 'panic', 'party', 'pickledance', 'poke', 'pray', 'puke', 'rant',
'rage', 'rock', 'rofl', 'rose', 'sadwave', 'shakeshead', 'shrug', 'slapfight',
'smokin', 'snicker', 'stolenkiss', 'strong', 'thumbsup', 'toast', 'tongue2',
'treasure', 'tux', 'twitch', 'welcome', 'whistle', 'woohoo', 'wookie',
'worship', 'yawn', 'lightsaberduel', 'howl',
];
const overload = {
'area51': 'alienbanana',
'embarrassed': 'redface',
'outrage': 'flipout',
'pray': 'praying',
'rock': 'headbanging',
'snicker': 'dontlaugh',
'treasure': 'kitty',
};
document.arrive('div.chatchannel', { existing: true }, (channel) => {
const channelTextarea = channel.querySelector('textarea.chat-input');
const emotesDiv = channel.querySelector('div.emoticons');
emoticonsList.forEach((value) => {
const a = document.createElement('a');
const img = document.createElement('img');
const pic = overload[value] !== undefined ? overload[value] : value;
img.src = 'http://static.wireclub.com/content/images/emoticons/' + pic + '.gif';
img.alt = value;
a.className = 'hiddengif';
a.appendChild(img);
a.addEventListener('click', () => {
const text = channelTextarea.value;
channelTextarea.value = text + ':' + img.alt + ':';
});
emotesDiv.appendChild(a);
});
});
}());
Wow, I thought I'd be waiting a while for this. Thanks a bunch!
I hope you don't mind if others take it and edit as they need?
I've edited to add the 'dontlaugh' emote, and change the pic shown for the 'snicker' emote.
Also, changed the version number on this minor revision.
// ==UserScript==
// @name wireclub emoticons
// @description Adds the hidden emoticons in wireclub to the emoticons menu
// @version 1.0.1
// @namespace https://greasyfork.org/users/424058
// @icon https://www.google.com/s2/favicons?sz=64&domain=www.wireclub.com
// @match https://www.wireclub.com/*
// @require https://cdnjs.cloudflare.com/ajax/libs/arrive/2.4.1/arrive.min.js#sha512-wkU3qYWjenbM+t2cmvw2ADRRh4opbOYBjkhrPGHV7M6dcE/TR0oKpoDkWXfUs3HrulI2JFuTQyqPLRih1V54EQ==
// @run-at document-body
// @grant none
// ==/UserScript==
/* global $ */
(function() {
'use strict';
const emoticonsList = [
'angel', 'ashamed', 'agree', 'area51', 'bacondance', 'banana', 'banghead',
'banned', 'bigeyes', 'biggrin', 'bighug', 'blahblah', 'bolt', 'bowdown',
'broken', 'bsflag', 'burn', 'cat', 'cheer', 'confused', 'cries', 'cube',
'cupid', 'cylon', 'dance', 'deal', 'deadhorse', 'devil', 'dog', 'doh', 'dontlaugh',
'dramacorn', 'dramaqueen', 'drool', 'drunk', 'duel', 'duh', 'embarrassed',
'evilbanana', 'eyebrow', 'eyeroll', 'excited', 'facepalm', 'fishslap',
'flirty', 'friendkiss', 'flowers', 'goodluck', 'haha', 'happy', 'heart',
'hug', 'headspin', 'hysterics', 'highfive', 'hides', 'inlove', 'laugh',
'lmfao', 'love', 'madbeating', 'mangapunksai', 'ninja', 'ohnoes', 'openarms',
'outrage', 'panic', 'party', 'pickledance', 'poke', 'pray', 'puke', 'rant',
'rage', 'rock', 'rofl', 'rose', 'sadwave', 'shakeshead', 'shrug', 'slapfight',
'smokin', 'snicker', 'stolenkiss', 'strong', 'thumbsup', 'toast', 'tongue2',
'treasure', 'tux', 'twitch', 'welcome', 'whistle', 'woohoo', 'wookie',
'worship', 'yawn', 'lightsaberduel', 'howl',
];
const overload = {
'area51': 'alienbanana',
'embarrassed': 'redface',
'outrage': 'flipout',
'pray': 'praying',
'rock': 'headbanging',
'snicker': 'snicker',
'dontlaugh': 'dontlaugh',
'treasure': 'kitty',
};
document.arrive('div.chatchannel', { existing: true }, (channel) => {
const channelTextarea = channel.querySelector('textarea.chat-input');
const emotesDiv = channel.querySelector('div.emoticons');
emoticonsList.forEach((value) => {
const a = document.createElement('a');
const img = document.createElement('img');
const pic = overload[value] !== undefined ? overload[value] : value;
img.src = 'http://static.wireclub.com/content/images/emoticons/' + pic + '.gif';
img.alt = value;
a.className = 'hiddengif';
a.appendChild(img);
a.addEventListener('click', () => {
const text = channelTextarea.value;
channelTextarea.value = text + ':' + img.alt + ':';
});
emotesDiv.appendChild(a);
});
});
}());
Yet another minor edit, to change alt to title, so tooltips work for me when I hover on those added emotes. I might wish for more, but any further than trivial edits, and I'm stumped.
Some things that might be nice in the future:
If tooltips worked on the preexisting emotes on the panel.
To add another button for even more of Wireclub's emotes. (That panel seems about full enough already!)
Too many buttons might make the button bar too wide, but grouping by two or three loose categories might be good. E.g.: Emotes, Animated Emotes, Flags&Symbols
Anybody else have ideas?
// ==UserScript==
// @name wireclub emoticons
// @description Adds the hidden emoticons in wireclub to the emoticons menu
// @version 1.0.2
// @namespace https://greasyfork.org/users/424058
// @icon https://www.google.com/s2/favicons?sz=64&domain=www.wireclub.com
// @match https://www.wireclub.com/*
// @require https://cdnjs.cloudflare.com/ajax/libs/arrive/2.4.1/arrive.min.js#sha512-wkU3qYWjenbM+t2cmvw2ADRRh4opbOYBjkhrPGHV7M6dcE/TR0oKpoDkWXfUs3HrulI2JFuTQyqPLRih1V54EQ==
// @run-at document-body
// @grant none
// ==/UserScript==
/* global $ */
(function() {
'use strict';
const emoticonsList = [
'angel', 'ashamed', 'agree', 'area51', 'bacondance', 'banana', 'banghead',
'banned', 'bigeyes', 'biggrin', 'bighug', 'blahblah', 'bolt', 'bowdown',
'broken', 'bsflag', 'burn', 'cat', 'cheer', 'confused', 'cries', 'cube',
'cupid', 'cylon', 'dance', 'deal', 'deadhorse', 'devil', 'dog', 'doh', 'dontlaugh',
'dramacorn', 'dramaqueen', 'drool', 'drunk', 'duel', 'duh', 'embarrassed',
'evilbanana', 'eyebrow', 'eyeroll', 'excited', 'facepalm', 'fishslap',
'flirty', 'friendkiss', 'flowers', 'goodluck', 'haha', 'happy', 'heart',
'hug', 'headspin', 'hysterics', 'highfive', 'hides', 'inlove', 'laugh',
'lmfao', 'love', 'madbeating', 'mangapunksai', 'ninja', 'ohnoes', 'openarms',
'outrage', 'panic', 'party', 'pickledance', 'poke', 'pray', 'puke', 'rant',
'rage', 'rock', 'rofl', 'rose', 'sadwave', 'shakeshead', 'shrug', 'slapfight',
'smokin', 'snicker', 'stolenkiss', 'strong', 'thumbsup', 'toast', 'tongue2',
'treasure', 'tux', 'twitch', 'welcome', 'whistle', 'woohoo', 'wookie',
'worship', 'yawn', 'lightsaberduel', 'howl',
];
const overload = {
'area51': 'alienbanana',
'embarrassed': 'redface',
'outrage': 'flipout',
'pray': 'praying',
'rock': 'headbanging',
'snicker': 'snicker',
'dontlaugh': 'dontlaugh',
'treasure': 'kitty',
};
document.arrive('div.chatchannel', { existing: true }, (channel) => {
const channelTextarea = channel.querySelector('textarea.chat-input');
const emotesDiv = channel.querySelector('div.emoticons');
emoticonsList.forEach((value) => {
const a = document.createElement('a');
const img = document.createElement('img');
const pic = overload[value] !== undefined ? overload[value] : value;
img.src = 'http://static.wireclub.com/content/images/emoticons/' + pic + '.gif';
img.title = value;
a.className = 'hiddengif';
a.appendChild(img);
a.addEventListener('click', () => {
const text = channelTextarea.value;
channelTextarea.value = text + ':' + img.title + ':';
});
emotesDiv.appendChild(a);
});
});
}());
Another minor edit, the site changed the location for icons. Only some still displayed using the old address, others came up missing. Changed static.wireclub.com
to newstatic.wireclub.com
, and now it's back to working as well as it did before.
// ==UserScript==
// @name wireclub emoticons
// @description Adds the hidden emoticons in wireclub to the emoticons menu
// @version 1.0.3
// @namespace https://greasyfork.org/users/424058
// @icon https://www.google.com/s2/favicons?sz=64&domain=www.wireclub.com
// @match https://www.wireclub.com/*
// @require https://cdnjs.cloudflare.com/ajax/libs/arrive/2.4.1/arrive.min.js#sha512-wkU3qYWjenbM+t2cmvw2ADRRh4opbOYBjkhrPGHV7M6dcE/TR0oKpoDkWXfUs3HrulI2JFuTQyqPLRih1V54EQ==
// @run-at document-body
// @grant none
// ==/UserScript==
/* global $ */
(function() {
'use strict';
const emoticonsList = [
'angel', 'ashamed', 'agree', 'area51', 'bacondance', 'banana', 'banghead',
'banned', 'bigeyes', 'biggrin', 'bighug', 'blahblah', 'bolt', 'bowdown',
'broken', 'bsflag', 'burn', 'cat', 'cheer', 'confused', 'cries', 'cube',
'cupid', 'cylon', 'dance', 'deal', 'deadhorse', 'devil', 'dog', 'doh', 'dontlaugh',
'dramacorn', 'dramaqueen', 'drool', 'drunk', 'duel', 'duh', 'embarrassed',
'evilbanana', 'eyebrow', 'eyeroll', 'excited', 'facepalm', 'fishslap',
'flirty', 'friendkiss', 'flowers', 'goodluck', 'haha', 'happy', 'heart',
'hug', 'headspin', 'hysterics', 'highfive', 'hides', 'inlove', 'laugh',
'lmfao', 'love', 'madbeating', 'mangapunksai', 'ninja', 'ohnoes', 'openarms',
'outrage', 'panic', 'party', 'pickledance', 'poke', 'pray', 'puke', 'rant',
'rage', 'rock', 'rofl', 'rose', 'sadwave', 'shakeshead', 'shrug', 'slapfight',
'smokin', 'snicker', 'stolenkiss', 'strong', 'thumbsup', 'toast', 'tongue2',
'treasure', 'tux', 'twitch', 'welcome', 'whistle', 'woohoo', 'wookie',
'worship', 'yawn', 'lightsaberduel', 'howl',
];
const overload = {
'area51': 'alienbanana',
'embarrassed': 'redface',
'outrage': 'flipout',
'pray': 'praying',
'rock': 'headbanging',
'snicker': 'snicker',
'dontlaugh': 'dontlaugh',
'treasure': 'kitty',
};
document.arrive('div.chatchannel', { existing: true }, (channel) => {
const channelTextarea = channel.querySelector('textarea.chat-input');
const emotesDiv = channel.querySelector('div.emoticons');
emoticonsList.forEach((value) => {
const a = document.createElement('a');
const img = document.createElement('img');
const pic = overload[value] !== undefined ? overload[value] : value;
img.src = 'http://newstatic.wireclub.com/content/images/emoticons/' + pic + '.gif';
img.title = value;
a.className = 'hiddengif';
a.appendChild(img);
a.addEventListener('click', () => {
const text = channelTextarea.value;
channelTextarea.value = text + ':' + img.title + ':';
});
emotesDiv.appendChild(a);
});
});
}());
I thank you for your consideration. My request is that you examine a certain Wireclub Emoticons Chrome extension, and if you could, convert this into a user script, or create a script with similar functionality from scratch.
It's no longer on the Chrome Web Store, but here's another place that hosts it. https://chrome-stats.com/d/cecbcihgkbehndgpcoapnlhflecabbal