🏠 Home 

Corrigir formatação do fórum

try to take over the world!

// ==UserScript==
// @name         Corrigir formatação do fórum
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  try to take over the world!
// @author       You
// @match        https://forum.playragnarokonlinebr.com/index.php?/topic/*
// @match        https://forum.playragnarokonlinebr.com/index.php?/forum/*/&do=add
// @icon         https://www.google.com/s2/favicons?sz=64&domain=playragnarokonlinebr.com
// @grant        none
// ==/UserScript==
$(document).ready(function(){
$("body").append('<div id="sem-negrito" style="cursor:pointer;z-index: 10;position: fixed;width: 58px;height: 58px;display: block;background:linear-gradient(0deg, #a1512b, #ebb680);border:1px solid #562c1b;border-radius: 50%;padding-top:13px;text-align: center;font-size: 9px;color: white;right: 20px;bottom: 51px;">corrigir formatação</div>')
$("#sem-negrito").click(function(){
$("b[id^=docs-internal-guid]").each(function() {
let conteudo = $(this).html();
$(this).replaceWith(conteudo);
});
while($("p b span").length > 0) {
let conteudo = $("p b span").eq(0).closest("b").html();
$("p b span").eq(0).closest("b").replaceWith(conteudo);
}
$(".cke_wysiwyg_div *").filter(function() {
var $this = $(this);
return $this.css("background")
|| $this.css("background-color");
}).each(function() {
console.log($(this).css("background-color").indexOf("#"));
console.log($(this).css("background-color").substring(1));
console.log($(this).css("background-color").replace(/\D/g,''));
console.log("---");
if( /[1-9]/.test($(this).css("background-color").indexOf("#") >= 0 ? $(this).css("background-color").substring(1) : $(this).css("background-color").replace(/\D/g,'')) ) {
console.log("entrou")
$(this).css("background-color","");
$(this).css("color","");
}
});
});
});