Skip to content

Instantly share code, notes, and snippets.

@huntrax11
Last active December 10, 2019 08:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save huntrax11/2ffa03f04e4e29e37387cdcbb043a70a to your computer and use it in GitHub Desktop.
Save huntrax11/2ffa03f04e4e29e37387cdcbb043a70a to your computer and use it in GitHub Desktop.
whooing-hide-fiugre.user.js
// ==UserScript==
// @name 후잉 hide figures
// @namespace http://tampermonkey.net/
// @version 0.1
// @description 후잉 숫자를 가려드립니다.
// @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...
$.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);
}, 10);
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment