Two Plus Two Publishing LLC
Two Plus Two Publishing LLC
 

Go Back   Two Plus Two Poker Forums > >

Notices

About the Forums Here's where you post suggestions about the forums and the software that implements them.

Reply
 
Thread Tools Display Modes
Old 10-18-2018, 09:21 PM   #10851
gregorio
Carpal \'Tunnel
 
Join Date: Jan 2007
Posts: 33,442
Re: ATF Chatroom, for O/T chat

Hi, here's a script that I use to get rid of those idiotic tapatalk signatures. It gets most of them but sometimes a rogue language signature gets through
Code:
// ==UserScript==
// @name           Replace Text On Webpages
// @namespace      https://userscripts-mirror.org/users/23652
// @description    Replaces text on websites. Now supports wildcards in search queries. Won't replace text in certain tags like links and code blocks
// @include        http://*
// @include        https://*
// @include        file://*
// @exclude        https://userscripts-mirror.org/scripts/review/*
// @exclude        https://userscripts-mirror.org/scripts/edit/*
// @exclude        https://userscripts-mirror.org/scripts/edit_src/*
// @exclude        https://userscripts-mirror.org/scripts/review/*
// @exclude        https://userscripts-mirror.org/scripts/edit/*
// @exclude        https://userscripts-mirror.org/scripts/edit_src/*
// @copyright      JoeSimmons
// @version        1.1.0
// @license        http://creativecommons.org/licenses/by-nc-nd/3.0/us/
// @downloadURL    https://userscripts-mirror.org/scripts/source/41369.user.js
// @updateURL      https://userscripts-mirror.org/scripts/source/41369.meta.js
// ==/UserScript==
(function () {
    'use strict';

    /*
        NOTE: 
            You can use \\* to match actual asterisks instead of using it as a wildcard!
            The examples below show a wildcard in use and a regular asterisk replacement.
    */

    var words = {
    ///////////////////////////////////////////////////////

        // Syntax: 'Search word' : 'Replace word',
        'Sent from my * * * * *' : ' ',
        'Sent from my * * * *' : ' ',
        'Sent from my * * *' : ' ',
        'Sent from my * *' : ' ',
        'Sent from my iPhone using Tapatalk ' : ' ',

    ///////////////////////////////////////////////////////
    '':''};

    //////////////////////////////////////////////////////////////////////////////
    // This is where the real code is
    // Don't edit below this
    //////////////////////////////////////////////////////////////////////////////

    var regexs = [], replacements = [],
        tagsWhitelist = ['PRE', 'BLOCKQUOTE', 'CODE', 'INPUT', 'BUTTON', 'TEXTAREA'],
        rIsRegexp = /^\/(.+)\/([gim]+)?$/,
        word, text, texts, i, userRegexp;

    // prepareRegex by JoeSimmons
    // used to take a string and ready it for use in new RegExp()
    function prepareRegex(string) {
        return string.replace(/([\[\]\^\&\$\.\(\)\?\/\\\+\{\}\|])/g, '\\$1');
    }

    // function to decide whether a parent tag will have its text replaced or not
    function isTagOk(tag) {
        return tagsWhitelist.indexOf(tag) === -1;
    }

    delete words['']; // so the user can add each entry ending with a comma,
                      // I put an extra empty key/value pair in the object.
                      // so we need to remove it before continuing

    // convert the 'words' JSON object to an Array
    for (word in words) {
        if ( typeof word === 'string' && words.hasOwnProperty(word) ) {
            userRegexp = word.match(rIsRegexp);

            // add the search/needle/query
            if (userRegexp) {
                regexs.push(
                    new RegExp(userRegexp[1], 'g')
                );
            } else {
                regexs.push(
                    new RegExp(prepareRegex(word).replace(/\\?\*/g, function (fullMatch) {
                        return fullMatch === '\\*' ? '*' : '[^ ]*';
                    }), 'g')
                );
            }

            // add the replacement
            replacements.push( words[word] );
        }
    }

    // do the replacement
    texts = document.evaluate('//body//text()[ normalize-space(.) != "" ]', document, null, 6, null);
    for (i = 0; text = texts.snapshotItem(i); i += 1) {
        if ( isTagOk(text.parentNode.tagName) ) {
            regexs.forEach(function (value, index) {
                text.data = text.data.replace( value, replacements[index] );
            });
        }
    }

}());
PS I'm not JoeSimmons so don't hunt him down and kill him next time I delete one of your posts, I just filled in the blanks in his script.

Last edited by gregorio; 10-18-2018 at 10:04 PM.
gregorio is offline   Reply With Quote
Old 10-19-2018, 01:40 AM   #10852
MinusEV
Giftastic!
 
MinusEV's Avatar
 
Join Date: Oct 2005
Location: Don't trust men who walk with canes
Posts: 11,051
Re: ATF Chatroom, for O/T chat

This opens up exciting possibilities.

Spoiler:
MinusEV is offline   Reply With Quote
Old 10-19-2018, 12:29 PM   #10853
gregorio
Carpal \'Tunnel
 
Join Date: Jan 2007
Posts: 33,442
Re: ATF Chatroom, for O/T chat

close
Spoiler:
gregorio is offline   Reply With Quote
Old 10-19-2018, 01:52 PM   #10854
MinusEV
Giftastic!
 
MinusEV's Avatar
 
Join Date: Oct 2005
Location: Don't trust men who walk with canes
Posts: 11,051
Re: ATF Chatroom, for O/T chat

Clearly JoeSimmons can't code.
MinusEV is offline   Reply With Quote
Old 10-19-2018, 06:30 PM   #10855
AlwaysFolding
masterbaker
 
AlwaysFolding's Avatar
 
Join Date: Oct 2016
Location: Mr. H0rus' Steel Cage Match
Posts: 12,386
Re: ATF Chatroom, for O/T chat

Clearly!
AlwaysFolding is offline   Reply With Quote
Old 10-19-2018, 08:02 PM   #10856
R*R
Painting It Black
 
R*R's Avatar
 
Join Date: Mar 2007
Location: Drinking coffee and carrying the 3
Posts: 8,277
Re: ATF Chatroom, for O/T chat

Demonstrably
R*R is offline   Reply With Quote
Old 10-20-2018, 03:47 PM   #10857
kerowo
lolcat
 
kerowo's Avatar
 
Join Date: Nov 2005
Posts: 35,609
Re: ATF Chatroom, for O/T chat

Is it bona fide?
kerowo is offline   Reply With Quote
Old 10-20-2018, 03:56 PM   #10858
MinusEV
Giftastic!
 
MinusEV's Avatar
 
Join Date: Oct 2005
Location: Don't trust men who walk with canes
Posts: 11,051
Re: ATF Chatroom, for O/T chat

The type that makes me feel old.
MinusEV is offline   Reply With Quote
Old 10-20-2018, 05:42 PM   #10859
AlwaysFolding
masterbaker
 
AlwaysFolding's Avatar
 
Join Date: Oct 2016
Location: Mr. H0rus' Steel Cage Match
Posts: 12,386
Re: ATF Chatroom, for O/T chat

It's licensed and bonded.
AlwaysFolding is offline   Reply With Quote
Old 10-20-2018, 06:01 PM   #10860
Morphismus
Gimperator
 
Morphismus's Avatar
 
Join Date: Feb 2008
Location: Team Manbag
Posts: 16,995
Re: ATF Chatroom, for O/T chat

Quote:
Originally Posted by plaaynde View Post
Preparing a new politics thread. It must be my turn now.
Where is your politics thread?
Morphismus is offline   Reply With Quote
Old 10-21-2018, 01:57 AM   #10861
plaaynde
Poker Historian
 
plaaynde's Avatar
 
Join Date: Jan 2010
Location: Local Group
Posts: 17,108
Re: ATF Chatroom, for O/T chat

It will be there in due time



See it as an excuse to post yet another video.
plaaynde is offline   Reply With Quote
Old 10-21-2018, 04:08 AM   #10862
R*R
Painting It Black
 
R*R's Avatar
 
Join Date: Mar 2007
Location: Drinking coffee and carrying the 3
Posts: 8,277
Re: ATF Chatroom, for O/T chat

And it's researched and validated.
R*R is offline   Reply With Quote
Old 10-21-2018, 04:12 AM   #10863
R*R
Painting It Black
 
R*R's Avatar
 
Join Date: Mar 2007
Location: Drinking coffee and carrying the 3
Posts: 8,277
Re: ATF Chatroom, for O/T chat

Quote:
Originally Posted by Morphismus View Post
Quote:
Originally Posted by plaaynde View Post

I'd say you are both going mad.
R*R is offline   Reply With Quote
Old 10-22-2018, 10:10 AM   #10864
plaaynde
Poker Historian
 
plaaynde's Avatar
 
Join Date: Jan 2010
Location: Local Group
Posts: 17,108
Re: ATF Chatroom, for O/T chat

Trump and Putin: true.
plaaynde is offline   Reply With Quote
Old 10-22-2018, 10:34 AM   #10865
AlwaysFolding
masterbaker
 
AlwaysFolding's Avatar
 
Join Date: Oct 2016
Location: Mr. H0rus' Steel Cage Match
Posts: 12,386
Re: ATF Chatroom, for O/T chat

Dump and Pootin: pew
AlwaysFolding is offline   Reply With Quote
Old 10-24-2018, 03:06 PM   #10866
Sammy2bullets
Carpal \'Tunnel
 
Sammy2bullets's Avatar
 
Join Date: Jan 2015
Location: Kepler 452B
Posts: 8,828
Re: ATF Chatroom, for O/T chat

A group of researchers have filmed a type of sea creature known as a "headless chicken monster" swimming in waters near Antarctica for the first time. The discovery was made as part of an effort to discover new marine conservation areas and protect the deep ocean.

Sammy2bullets is offline   Reply With Quote
Old 10-24-2018, 03:16 PM   #10867
Brock Landers
Carpal \'Tunnel
 
Join Date: Oct 2004
Location: So. Cal.
Posts: 7,528
Re: ATF Chatroom, for O/T chat

George likes his chicken spicy
Brock Landers is offline   Reply With Quote
Old 10-24-2018, 06:10 PM   #10868
Sammy2bullets
Carpal \'Tunnel
 
Sammy2bullets's Avatar
 
Join Date: Jan 2015
Location: Kepler 452B
Posts: 8,828
Re: ATF Chatroom, for O/T chat

Quote:
Originally Posted by Brock Landers View Post
George likes his chicken spicy
Cyndi Lauper married David Thornton in 1991
Sammy2bullets is offline   Reply With Quote
Old 10-24-2018, 07:41 PM   #10869
AlwaysFolding
masterbaker
 
AlwaysFolding's Avatar
 
Join Date: Oct 2016
Location: Mr. H0rus' Steel Cage Match
Posts: 12,386
Re: ATF Chatroom, for O/T chat

Sammy Danishmark married Samuelina Danishmarkina in 2018.
AlwaysFolding is offline   Reply With Quote
Old 10-25-2018, 04:46 PM   #10870
Videopro
Formerly Professionalpoker
 
Videopro's Avatar
 
Join Date: Oct 2002
Location: Henderson of course.
Posts: 17,132
Re: ATF Chatroom, for O/T chat

Chico needed the money
Videopro is offline   Reply With Quote
Old 10-26-2018, 05:02 AM   #10871
Rexx14
Carpal \'Tunnel
 
Rexx14's Avatar
 
Join Date: Mar 2013
Posts: 6,545
Re: ATF Chatroom, for O/T chat

Any chance we can ban politics threads in ATF? They're starting to annoy me. TIA.
Rexx14 is offline   Reply With Quote
Old 10-26-2018, 07:18 AM   #10872
Gin 'n Tonic
Carpal \'Tunnel
 
Gin 'n Tonic's Avatar
 
Join Date: Mar 2005
Location: Reclining my seat
Posts: 6,233
Re: ATF Chatroom, for O/T chat

Seconded.
Gin 'n Tonic is offline   Reply With Quote
Old 10-26-2018, 10:14 AM   #10873
kerowo
lolcat
 
kerowo's Avatar
 
Join Date: Nov 2005
Posts: 35,609
Re: ATF Chatroom, for O/T chat

Unfortunately you waited for a week after they were all closed to complain, so no.
kerowo is offline   Reply With Quote
Old 10-26-2018, 07:01 PM   #10874
Rexx14
Carpal \'Tunnel
 
Rexx14's Avatar
 
Join Date: Mar 2013
Posts: 6,545
Re: ATF Chatroom, for O/T chat

My post requested that they be banned altogether not locked. Where's the nuke option when you need it!
Rexx14 is offline   Reply With Quote
Old 10-26-2018, 11:02 PM   #10875
plaaynde
Poker Historian
 
plaaynde's Avatar
 
Join Date: Jan 2010
Location: Local Group
Posts: 17,108
Re: ATF Chatroom, for O/T chat

I'd let even P bloom.
plaaynde is offline   Reply With Quote

Reply
      

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Forum Jump


All times are GMT -4. The time now is 11:54 PM.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright © 2008-2017, Two Plus Two Interactive
 
 
Poker Players - Streaming Live Online