m (Reverted edits by Trisha2 (talk | block) to last version by Depth Strider 10) |
(→Voting) Tag: rte-wysiwyg |
||
Line 1: | Line 1: | ||
⚫ | {{Discussion}} ==Instructions== {{DiscussionInstructionsSection|Voting}} ==Proposal== {{DiscussionBoxBegin}} My original proposal is as follows: ''Currently, our Chat Filter is just an emote in chat, there HOWEVER is a way where we do not even need emotes, it is .js coding that would go in Chat,js, and is the following.'' |
||
− | {{Discussion}} |
||
⚫ | |||
− | |||
⚫ | |||
− | ==Instructions== |
||
⚫ | |||
− | {{DiscussionInstructionsSection|Voting}} |
||
⚫ | |||
− | |||
+ | |||
− | ==Proposal== |
||
⚫ | |||
− | {{DiscussionBoxBegin}} |
||
⚫ | |||
− | My original proposal is as follows: |
||
⚫ | |||
− | |||
⚫ | |||
⚫ | |||
+ | |||
− | <pre> |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
− | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
− | + | filter.regex = [ |
|
⚫ | |||
− | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
+ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
+ | filter.evaluated.push(filter.plain[i].replace(/[\\\/\{\}\,\[\-\]\(\|\)\.\,\?\!\=\*\+\^\$]/g, "\\$&")); |
||
⚫ | |||
⚫ | |||
⚫ | |||
+ | for (var i in filter.regex) { |
||
⚫ | |||
⚫ | |||
⚫ | |||
− | + | } |
|
+ | |||
⚫ | |||
⚫ | |||
− | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
− | + | filter.evaluated.join("|") + |
|
− | + | ")(?: |\\.|\\,|\\\\|\\/|\\[|\\]|_|\\-|\\(|\\)|\\{|\\}|\'|\"|\\?|\\!|$)", |
|
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
+ | |||
⚫ | |||
⚫ | |||
− | } |
||
⚫ | |||
− | |||
+ | var s = String(n), |
||
⚫ | |||
+ | lastD = s.match(/[1-3]$/), |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
− | filter.evaluated.join("|") + |
||
⚫ | |||
− | ")(?: |\\.|\\,|\\\\|\\/|\\[|\\]|_|\\-|\\(|\\)|\\{|\\}|\'|\"|\\?|\\!|$)", |
||
+ | "3": "rd" |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
− | |||
+ | } |
||
⚫ | |||
⚫ | |||
⚫ | |||
− | + | if (e.keyCode == 13) { |
|
− | + | if ($(this).val().match(regex)) { |
|
⚫ | |||
⚫ | |||
− | + | count++; |
|
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
− | } |
+ | } else { |
⚫ | |||
⚫ | |||
⚫ | |||
− | } |
||
+ | } |
||
⚫ | |||
+ | } |
||
− | if (e.keyCode == 13) { |
||
+ | } |
||
− | if ($(this).val().match(regex)) { |
||
⚫ | |||
⚫ | |||
⚫ | |||
− | count++; |
||
+ | ''With this code, their message would not even go through, and a message pops up warning the user of their language, and if attempted again, they'll be kicked.'' ''This would help prevent raids, trolls, and make the wiki a lot more fun.'' This voting stage will end on Monday, August, 15 2016 at 9:30 a.m., eastern time. {{AustinSig2}} {{DiscussionBoxEnd}} ==Voting== {{CreateNewVoteButton}} *{{Support}} While we're at it, can we keep the dolphin as its own emote? We can use with (dolphin).--[[User:TrevorOntario719|TrevorOntario719]] ([[User talk:TrevorOntario719|talk]]) 15:44, August 5, 2016 (UTC) *{{Oppose}} {{Cans48Sig}} *{{Support|ES}} I assure you, this is gonna be boss {{J}}15:52, August 5, 2016 (UTC) *{{Support}} Can we keep some emoticons so we can know what someone is eating? [[User:Trisha2|Trisha2]] *{{Support}} {{DepthSig}} *{{Neutral}} Meh [[User:TheSwordWillCome|TheSwordWillCome]] |
||
⚫ | |||
⚫ | |||
− | } else { |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
− | }); |
||
− | </pre> |
||
− | ''With this code, their message would not even go through, and a message pops up warning the user of their language, and if attempted again, they'll be kicked.'' |
||
− | |||
− | ''This would help prevent raids, trolls, and make the wiki a lot more fun.'' |
||
− | |||
− | |||
− | This voting stage will end on Monday, August, 15 2016 at 9:30 a.m., eastern time. {{AustinSig2}} |
||
− | {{DiscussionBoxEnd}} |
||
− | |||
− | ==Voting== |
||
− | {{CreateNewVoteButton}} |
||
− | |||
− | *{{Support}} While we're at it, can we keep the dolphin as its own emote? We can use with (dolphin).--[[User:TrevorOntario719|TrevorOntario719]] ([[User talk:TrevorOntario719|talk]]) 15:44, August 5, 2016 (UTC) |
||
− | |||
− | *{{Oppose}} {{Cans48Sig}} |
||
− | |||
− | *{{Support|ES}} I assure you, this is gonna be boss {{J}}15:52, August 5, 2016 (UTC) |
||
− | |||
− | *{{Support}} [[User:Trisha2|Trisha2]] |
||
− | *{{Support}} {{DepthSig}} |
||
− | |||
− | *{{Neutral}} Meh [[User:TheSwordWillCome|TheSwordWillCome]] |
Revision as of 16:17, 5 August 2016
Open Proposal
The following is an ongoing proposal. Please feel free to voice your opinion, but be sure to follow the rules. How proposals work
You can use any of the following prior to your comments to show your opinion. Neutral votes do not count in determining the outcome percentage. |
==Instructions==
This page is the voting stage of this discussion: "Change Chat Filter."
With all concerns from the concern stage of this discussion having been resolved and taken into account, the proposal located in the "Proposal" section above has been created and moved to voting. To join the voting, you simply use buttons located in the "Voting" section of this page and fill the resulting page.
Have a happy voting!
==Proposal==
/* the following script blocks certain words in certain conditions regex reduction suggested by Callofduty4 http://community.wikia.com/wiki/Thread:628738#7 */ $(function() { var count = 0, limit = 2, filter = {}; // simple phrases filter.plain = [ "emample", "example2", "example3, ]; // phrases as regular expressions filter.regex = [ "test", "testing", "test123", ]; // the evaluated phrases filter.evaluated = []; for (var i in filter.plain) { filter.evaluated.push(filter.plain[i].replace(/[\\\/\{\}\,\[\-\]\(\|\)\.\,\?\!\=\*\+\^\$]/g, "\\$&")); } for (var i in filter.regex) { filter.evaluated.push(filter.regex[i]); } // regex object var regex = new RegExp( "(?:^| |\\.|\\,|\\\\|\\/|\\[|\\]|_|\\-|\\(|\\)|\\{|\\}|\'|\"|\\|?\\!)(?:" + filter.evaluated.join("|") + ")(?: |\\.|\\,|\\\\|\\/|\\[|\\]|_|\\-|\\(|\\)|\\{|\\}|\'|\"|\\?|\\!|$)", "i" // case insensitive ); // add digit suffix (e.g. "9001" -> "9001st" function parseTime(n) { var s = String(n), lastD = s.match(/[1-3]$/), suffixes = { "1": "st", "2": "nd", "3": "rd" }; return s + (lastD ? suffixes[lastD[0]] : "th"); } $('textarea[name="message"]').keydown(function(e) { if (e.keyCode == 13) { if ($(this).val().match(regex)) { $(this).val(""); count++; if (count < limit) { alert("Warning! You have been caught using a restricted phrase and your message has been blocked.\nThis is the " + parseTime(count) + " time you have been caught doing so. If this number reaches " + limit + ", you will be kicked."); } else { location.href = "/"; window.close(); } } } }); });With this code, their message would not even go through, and a message pops up warning the user of their language, and if attempted again, they'll be kicked. This would help prevent raids, trolls, and make the wiki a lot more fun. This voting stage will end on Monday, August, 15 2016 at 9:30 a.m., eastern time. AustinD-3 (Message Me Here!)
==Voting==
Cans48 (Messages) * Extremely Strong Support - I assure you, this is gonna be boss Jersey the DIEHL (SpongeFreddy777) wall • contribs15:52, August 5, 2016 (UTC) * Support - Can we keep some emoticons so we can know what someone is eating? Trisha2 * Support - Sponge o' Mystery (Depth Strider 10) * Neutral - Meh TheSwordWillCome