Skip to content

Instantly share code, notes, and snippets.

@kimdwkimdw
Forked from huntrax11/whooing-hide-fiugre.user.js
Last active December 10, 2019 08:06
Show Gist options
  • Save kimdwkimdw/5d895373bc0fa74b20c7ae74579a928b to your computer and use it in GitHub Desktop.
Save kimdwkimdw/5d895373bc0fa74b20c7ae74579a928b to your computer and use it in GitHub Desktop.

Revisions

  1. kimdwkimdw revised this gist Dec 10, 2019. 1 changed file with 11 additions and 21 deletions.
    32 changes: 11 additions & 21 deletions whooing-hide-fiugre.user.js
    Original file line number Diff line number Diff line change
    @@ -10,28 +10,18 @@
    // @grant none
    // ==/UserScript==

    (function() {
    (function () {
    'use strict';
    // Your code here...
    $.noConflict();
    jQuery( document ).ready(function( $ ) {
    setInterval(function(){
    function do_mask(idx, elem){
    const regex = /[ ]*([0-9]{1,3}[,.]?)+[kmg%]?[ ]*$/ig;
    const text = $(elem).text();
    var matches = text.matchAll(regex);
    var subt_text = "";
    for (const match of matches) {
    subt_text += text.substr(subt_text.length, match.index);
    subt_text += match[0].replace(/[0-9]/g, '#');
    }
    if (subt_text.length > 0) {
    subt_text += text.substr(subt_text.length);
    $(elem).text(subt_text);
    }
    };
    $('*:not(:has(*))').each(do_mask);
    $('*').each(do_mask);
    $(document).ready(function () {
    setInterval(function () {
    $('*').each(function (idx, elem) {
    var text = $(elem).text();
    if (text.match(/^[ ]*[+-]?([0-9]{1,3}[,.]?)+[kmg%]?[ ]*$/i)) {
    // console.log(text);
    var target_number = text.replace(/[0-9]/g, '#');
    $(elem).text('#'.repeat(target_number.length/2));
    }
    });
    }, 10);
    });
    })();
  2. @huntrax11 huntrax11 revised this gist Dec 9, 2019. 1 changed file with 12 additions and 4 deletions.
    16 changes: 12 additions & 4 deletions whooing-hide-fiugre.user.js
    Original file line number Diff line number Diff line change
    @@ -17,10 +17,18 @@
    jQuery( document ).ready(function( $ ) {
    setInterval(function(){
    function do_mask(idx, elem){
    var text = $(elem).text();
    if (text.match(/^[ ]*[+-]? ?([0-9]{1,3}[,.]?)+[kmg%]?[ ]*$/i)) {
    $(elem).text(text.replace(/[0-9]/g, '#'));
    }
    const regex = /[ ]*([0-9]{1,3}[,.]?)+[kmg%]?[ ]*$/ig;
    const text = $(elem).text();
    var matches = text.matchAll(regex);
    var subt_text = "";
    for (const match of matches) {
    subt_text += text.substr(subt_text.length, match.index);
    subt_text += match[0].replace(/[0-9]/g, '#');
    }
    if (subt_text.length > 0) {
    subt_text += text.substr(subt_text.length);
    $(elem).text(subt_text);
    }
    };
    $('*:not(:has(*))').each(do_mask);
    $('*').each(do_mask);
  3. @huntrax11 huntrax11 revised this gist Dec 6, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion whooing-hide-fiugre.user.js
    Original file line number Diff line number Diff line change
    @@ -18,7 +18,7 @@
    setInterval(function(){
    function do_mask(idx, elem){
    var text = $(elem).text();
    if (text.match(/^[ ]*[+-]?([0-9]{1,3}[,.]?)+[kmg%]?[ ]*$/i)) {
    if (text.match(/^[ ]*[+-]? ?([0-9]{1,3}[,.]?)+[kmg%]?[ ]*$/i)) {
    $(elem).text(text.replace(/[0-9]/g, '#'));
    }
    };
  4. @huntrax11 huntrax11 revised this gist Dec 6, 2019. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions whooing-hide-fiugre.user.js
    Original file line number Diff line number Diff line change
    @@ -6,14 +6,15 @@
    // @author Robert Park
    // @match https://whooing.com/
    // @match https://new.whooing.com/
    // @require https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js
    // @grant none
    // ==/UserScript==

    (function() {
    'use strict';
    // Your code here...

    $(document).ready(function(){
    $.noConflict();
    jQuery( document ).ready(function( $ ) {
    setInterval(function(){
    function do_mask(idx, elem){
    var text = $(elem).text();
  5. @huntrax11 huntrax11 revised this gist Dec 6, 2019. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion whooing-hide-fiugre.user.js
    Original file line number Diff line number Diff line change
    @@ -18,7 +18,6 @@
    function do_mask(idx, elem){
    var text = $(elem).text();
    if (text.match(/^[ ]*[+-]?([0-9]{1,3}[,.]?)+[kmg%]?[ ]*$/i)) {
    console.log(text);
    $(elem).text(text.replace(/[0-9]/g, '#'));
    }
    };
  6. @huntrax11 huntrax11 revised this gist Dec 6, 2019. 1 changed file with 6 additions and 4 deletions.
    10 changes: 6 additions & 4 deletions whooing-hide-fiugre.user.js
    Original file line number Diff line number Diff line change
    @@ -2,8 +2,8 @@
    // @name 후잉 hide figures
    // @namespace http://tampermonkey.net/
    // @version 0.1
    // @description try to take over the world!
    // @author You
    // @description 후잉 숫자를 가려드립니다.
    // @author Robert Park
    // @match https://whooing.com/
    // @match https://new.whooing.com/
    // @grant none
    @@ -15,13 +15,15 @@

    $(document).ready(function(){
    setInterval(function(){
    $('*').each(function(idx, elem){
    function do_mask(idx, elem){
    var text = $(elem).text();
    if (text.match(/^[ ]*[+-]?([0-9]{1,3}[,.]?)+[kmg%]?[ ]*$/i)) {
    console.log(text);
    $(elem).text(text.replace(/[0-9]/g, '#'));
    }
    });
    };
    $('*:not(:has(*))').each(do_mask);
    $('*').each(do_mask);
    }, 10);
    });
    })();
  7. @huntrax11 huntrax11 revised this gist Dec 6, 2019. 1 changed file with 8 additions and 8 deletions.
    16 changes: 8 additions & 8 deletions whooing-hide-fiugre.user.js
    Original file line number Diff line number Diff line change
    @@ -1,23 +1,23 @@
    // ==UserScript==
    // @name 후잉 hide figures
    // @namespace huntrax.com
    // @namespace http://tampermonkey.net/
    // @version 0.1
    // @description 후잉 숫자를 가려드립니다.
    // @author Robert Park
    // @description try to take over the world!
    // @author You
    // @match https://whooing.com/
    // @match https://new.whooing.com/
    // @grant none
    // ==/UserScript==

    (function () {
    (function() {
    'use strict';
    // Your code here...

    $(document).ready(function () {
    setInterval(function () {
    $('*').each(function (idx, elem) {
    $(document).ready(function(){
    setInterval(function(){
    $('*').each(function(idx, elem){
    var text = $(elem).text();
    if (text.match(/^[ ]*[+-]?([0-9]{1,3}[,.]?)+[kmg%]?[ ]*$/i)) {
    if (text.match(/^[ ]*[+-]?([0-9]{1,3}[,.]?)+[kmg%]?[ ]*$/i)) {
    console.log(text);
    $(elem).text(text.replace(/[0-9]/g, '#'));
    }
  8. @huntrax11 huntrax11 created this gist Dec 6, 2019.
    27 changes: 27 additions & 0 deletions whooing-hide-fiugre.user.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,27 @@
    // ==UserScript==
    // @name 후잉 hide figures
    // @namespace huntrax.com
    // @version 0.1
    // @description 후잉 숫자를 가려드립니다.
    // @author Robert Park
    // @match https://whooing.com/
    // @match https://new.whooing.com/
    // @grant none
    // ==/UserScript==

    (function () {
    'use strict';
    // Your code here...

    $(document).ready(function () {
    setInterval(function () {
    $('*').each(function (idx, elem) {
    var text = $(elem).text();
    if (text.match(/^[ ]*[+-]?([0-9]{1,3}[,.]?)+[kmg%]?[ ]*$/i)) {
    console.log(text);
    $(elem).text(text.replace(/[0-9]/g, '#'));
    }
    });
    }, 10);
    });
    })();