Encyclopedia SpongeBobia
Encyclopedia SpongeBobia
m (Reverted edits by Trisha2 (talk | block) to last version by Depth Strider 10)
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}}
 
 
/*
 
 
the following script blocks certain words in certain conditions
==Instructions==
 
 
regex reduction suggested by Callofduty4 http://community.wikia.com/wiki/Thread:628738#7
{{DiscussionInstructionsSection|Voting}}
 
 
*/
 
  +
==Proposal==
 
 
$(function() {
{{DiscussionBoxBegin}}
 
 
var count = 0,
My original proposal is as follows:
 
 
limit = 2,
 
 
filter = {};
''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.''
 
  +
<pre>
 
 
// simple phrases
/*
 
 
filter.plain = [
the following script blocks certain words in certain conditions
 
 
"emample",
regex reduction suggested by Callofduty4 http://community.wikia.com/wiki/Thread:628738#7
 
 
"example2",
*/
 
 
"example3,
 
 
$(function() {
 
 
];
var count = 0,
 
 
// phrases as regular expressions
limit = 2,
 
filter = {};
+
filter.regex = [
 
"test",
 
 
"testing",
// simple phrases
 
 
"test123",
filter.plain = [
 
 
"emample",
 
 
];
"example2",
 
  +
"example3,
 
 
// the evaluated phrases
 
 
filter.evaluated = [];
];
 
 
for (var i in filter.plain) {
// phrases as regular expressions
 
  +
filter.evaluated.push(filter.plain[i].replace(/[\\\/\{\}\,\[\-\]\(\|\)\.\,\?\!\=\*\+\^\$]/g, "\\$&"));
filter.regex = [
 
 
}
"test",
 
  +
for (var i in filter.regex) {
"testing",
 
 
filter.evaluated.push(filter.regex[i]);
"test123",
 
+
}
  +
];
 
 
// regex object
 
 
var regex = new RegExp(
// the evaluated phrases
 
 
"(?:^| |\\.|\\,|\\\\|\\/|\\[|\\]|_|\\-|\\(|\\)|\\{|\\}|\'|\"|\\|?\\!)(?:" +
filter.evaluated = [];
 
for (var i in filter.plain) {
+
filter.evaluated.join("|") +
filter.evaluated.push(filter.plain[i].replace(/[\\\/\{\}\,\[\-\]\(\|\)\.\,\?\!\=\*\+\^\$]/g, "\\$&"));
+
")(?: |\\.|\\,|\\\\|\\/|\\[|\\]|_|\\-|\\(|\\)|\\{|\\}|\'|\"|\\?|\\!|$)",
 
"i" // case insensitive
}
 
 
);
for (var i in filter.regex) {
 
  +
filter.evaluated.push(filter.regex[i]);
 
 
// add digit suffix (e.g. "9001" -> "9001st"
}
 
 
function parseTime(n) {
 
  +
var s = String(n),
// regex object
 
  +
lastD = s.match(/[1-3]$/),
var regex = new RegExp(
 
 
suffixes = {
"(?:^| |\\.|\\,|\\\\|\\/|\\[|\\]|_|\\-|\\(|\\)|\\{|\\}|\'|\"|\\|?\\!)(?:" +
 
 
"1": "st",
filter.evaluated.join("|") +
 
 
"2": "nd",
")(?: |\\.|\\,|\\\\|\\/|\\[|\\]|_|\\-|\\(|\\)|\\{|\\}|\'|\"|\\?|\\!|$)",
 
  +
"3": "rd"
"i" // case insensitive
 
 
};
);
 
 
return s + (lastD ? suffixes[lastD[0]] : "th");
 
  +
}
// add digit suffix (e.g. "9001" -> "9001st"
 
 
$('textarea[name="message"]').keydown(function(e) {
function parseTime(n) {
 
var s = String(n),
+
if (e.keyCode == 13) {
lastD = s.match(/[1-3]$/),
+
if ($(this).val().match(regex)) {
 
$(this).val("");
suffixes = {
 
"1": "st",
+
count++;
 
if (count < limit) {
"2": "nd",
 
 
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.");
"3": "rd"
 
};
+
} else {
 
location.href = "/";
return s + (lastD ? suffixes[lastD[0]] : "th");
 
 
window.close();
}
 
  +
}
$('textarea[name="message"]').keydown(function(e) {
 
  +
}
if (e.keyCode == 13) {
 
  +
}
if ($(this).val().match(regex)) {
 
 
});
$(this).val("");
 
 
});
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]]
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();
 
}
 
}
 
}
 
});
 
});
 
</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

Wiki
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
    Concerns stage
  1. Someone brings up a topic for a proposal.
  2. The community discusses that topic.
  3. Voting stage
  4. The proposal is brought to a vote, taking into account any changes discussed by the community.
  5. The community votes.

You can use any of the following prior to your comments to show your opinion.

{{Support}} • {{Neutral}} • {{Oppose}} • {{Change}} • {{Comment}} • {{Reply}} • {{Question}}
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==

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.
/*
	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!) Mario123

==Voting==

Choose your input: SupportNeutralOpposeComment

*Support Support - While we're at it, can we keep the dolphin as its own emote? We can use with (dolphin).--TrevorOntario719 (talk) 15:44, August 5, 2016 (UTC) *Oppose Oppose -

Cans48 (Messages) *Support Extremely Strong Support - I assure you, this is gonna be boss Jersey the DIEHL (SpongeFreddy777) wall contribs15:52, August 5, 2016 (UTC) *Support Support - Can we keep some emoticons so we can know what someone is eating? Trisha2 *Support Support - Sponge o' Mystery (Depth Strider 10) *Neutral Neutral - Meh TheSwordWillCome