Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name 4chan censorship replacer
- // @namespace http://tampermonkey.net/
- // @version 0.1
- // @description Replace censored words with uncensored version in the text inputs
- // @include https://boards.4chan.org/*
- // @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
- // ==/UserScript==
- (function() {
- 'use strict';
- var wordsTriggeringMods = ['soy','Soy'];
- function contains(target, pattern){
- var value = 0;
- pattern.forEach(function(word){
- value = value + target.includes(word);
- });
- return (value === 1);
- }
- $(document).on("click", "#file-n-submit [type='submit']", function(e){
- var content = $('[data-name="com"]');
- if(contains(content.val(), wordsTriggeringMods)){
- content.val(content.val().replace("soy", "so᠌y").replace("Soy", "So᠌y"));
- }
- });
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement