简体   繁体   中英

How to remove footer credits injected by a plugin in wordpress?

This is my website: https://washburnhome.com/

A plugin is adding credits in the footer. It's appended into the dom via JS.

You can go to site and check the live badge and code. However, the CSS code I added to remove the class is not working.

.MDow-1{display:none !important;}

The JS code injected by the plugin:

  var template = document.getElementById("MDow-1");
  var div = document.createElement("div");
  div.setAttribute("style", "display: block !important; clear: both !important".replace(/\s/g, " ".repeat(parseInt(Math.random() * 29 + 1))));
  var shadow = div.attachShadow({mode: "closed"});
  shadow.innerHTML = template.innerHTML;
  document.body.appendChild(div);

I suggest trying:

.MDow-1 { height: 0; }

This could provide another solution instead of trying to override the display: block. important on the tag.

But in reality if the plugin requires you to credit it in order to use then you should probably leave it or find another alternative.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM