• You MUST read the Babiato Rules before making your first post otherwise you may get permanent warning points or a permanent Ban.

    Our resources on Babiato Forum are CLEAN and SAFE. So you can use them for development and testing purposes. If your are on Windows and have an antivirus that alerts you about a possible infection: Know it's a false positive because all scripts are double checked by our experts. We advise you to add Babiato to trusted sites/sources or disable your antivirus momentarily while downloading a resource. "Enjoy your presence on Babiato"

Removing the nitropack inscription at the bottom

edit your wp-content/plugins/nitropack/nitropack-sdk/NitroPack/SDK/Pagecache


--> find
public function readfile()
--> find this code inside readfile function

if ($this->canUseCompression() && (ini_get("zlib.output_compression") === "0" || ini_set("zlib.output_compression", "0") !== false)) {
$filePath .= ".gz";
}
-->changed to
if ($this->canUseCompression() && (ini_get("zlib.output_compression") === "0" || ini_set("zlib.output_compression", "0") !== false)) {
//$filePath .= ".gz";
}

--> after that, find this code inside readfile function
echo $file->content;
---> changed to
//echo $file->content;
echo preg_replace('/<template id="[^>]*">[^>]*<style>.*?nitropack.io.*?<\/script>.+<script>/s', '<script>', $file->content);

Thank you for sharing!
 
hi everyone please help me remove nitropack footer link , from pagecache.php please i paste the code and my website break down, help me remove the footer link
 
edit your wp-content/plugins/nitropack/nitropack-sdk/NitroPack/SDK/Pagecache


--> find
public function readfile()
--> find this code inside readfile function

if ($this->canUseCompression() && (ini_get("zlib.output_compression") === "0" || ini_set("zlib.output_compression", "0") !== false)) {
$filePath .= ".gz";
}
-->changed to
if ($this->canUseCompression() && (ini_get("zlib.output_compression") === "0" || ini_set("zlib.output_compression", "0") !== false)) {
//$filePath .= ".gz";
}

--> after that, find this code inside readfile function
echo $file->content;
---> changed to
//echo $file->content;
echo preg_replace('/<template id="[^>]*">[^>]*<style>.*?nitropack.io.*?<\/script>.+<script>/s', '<script>', $file->content);

TKS
I will do the implementation
 
edit your wp-content/plugins/nitropack/nitropack-sdk/NitroPack/SDK/Pagecache


--> find
public function readfile()
--> find this code inside readfile function

if ($this->canUseCompression() && (ini_get("zlib.output_compression") === "0" || ini_set("zlib.output_compression", "0") !== false)) {
$filePath .= ".gz";
}
-->changed to
if ($this->canUseCompression() && (ini_get("zlib.output_compression") === "0" || ini_set("zlib.output_compression", "0") !== false)) {
//$filePath .= ".gz";
}

--> after that, find this code inside readfile function
echo $file->content;
---> changed to
//echo $file->content;
echo preg_replace('/<template id="[^>]*">[^>]*<style>.*?nitropack.io.*?<\/script>.+<script>/s', '<script>', $file->content);
 
  • Like
Reactions: Tyealia
Hi, I have added above
@gokurdera there are 2 method to hide the badge
1. using javascript
put this code to footer.php and purge cache,
*the badge will remove from bottom of page but still exist if you see view-source of you page.
JavaScript:
<script>
(function() {

let divc = document.querySelector('div[style]');
if(divc){
let actdisplay = window.getComputedStyle(divc, null).display;
let actclear = window.getComputedStyle(divc, null).clear;

if(actdisplay == 'block' && actclear == 'both')    {
divc.remove();
}
}

})();

</script>
if the js code above doesn't work, use code below
JavaScript:
<script>
document.addEventListener("DOMContentLoaded", function(){
let divc = document.querySelectorAll('div[style]');
for (let i = 0, len = divc.length; i < len; i++) {

let actdisplay = window.getComputedStyle(divc[i], null).display;
let actclear = window.getComputedStyle(divc[i], null).clear;

if(actdisplay == 'block' && actclear == 'both')    {
divc[i].remove();
}
}
}); 
  
</script>

2. using php
you need edit file wp-content/plugins/nitropack/nitropack-sdk/NitroPack/SDK/Pagecache.php
you dont need purge cache if you using this method

PHP:
# first find
public function readfile()
# and find this code inside readfile function

if ($this->canUseCompression() && (ini_get("zlib.output_compression") === "0" || ini_set("zlib.output_compression", "0") !== false)) {
            $filePath .= ".gz";
}
#changed to
if ($this->canUseCompression() && (ini_get("zlib.output_compression") === "0" || ini_set("zlib.output_compression", "0") !== false)) {
           //$filePath .= ".gz";
}

# after that, find this code inside readfile function
echo $file->content;
# changed to
//echo $file->content;
echo preg_replace('/<template id="[^>]*">[^>]*<style>.*?nitropack.io.*?<\/script>.+<script>/s', '<script>', $file->content);
*ofcourse you can modify the regex to make it better, but for me it's working fine
you can see if the code working or not in here POC
11.png
Hi, I have tried these scripts and styles. But nitro plugin showing error.
 
Hey i am running a website i tried nitropack plugin to optimize my website i tried the above two codes etc.
i also tried this .npf{display: none !important}
but footer is still on the bottom.
any possible solution?
Hey i am running a website i tried nitropack plugin to optimize my website i tried the above two codes etc.
i also tried this .npf{display: none !important}
but footer is still on the bottom.
any possible solution?
Hm? @medw1311
 
Last edited by a moderator:
  • Like
Reactions: Medw1311
Thank you very much. It worked perfectly! @dweep

Solution: modify the PHP code in wp-content/plugins/nitropack/nitropack-sdk/NitroPack/SDK/Pagecache
 
Just get the HTML class and go to WP-admin -> Themes -> Customize -> Additional Css

Add this code, but before adding also copy the HTML class

Code:
YOURCLASS {
    background: #fff;
    color: #454545;
    visibility: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
    height: 0 !important;
}

Mine is something like this
Code:
.MYcAyDjwgjAZjMExYjN3DMAu2Zz3theme--light {
    background: #fff;
    color: #454545;
    visibility: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
    height: 0 !important;
}

and it works....
 
You can Remove Nitropack Footer using javascript.
Please watch this tutorial on how to do it.


Just get the HTML class and go to WP-admin -> Themes -> Customize -> Additional Css

Add this code, but before adding also copy the HTML class

Code:
YOURCLASS {
    background: #fff;
    color: #454545;
    visibility: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
    height: 0 !important;
}

Mine is something like this
Code:
.MYcAyDjwgjAZjMExYjN3DMAu2Zz3theme--light {
    background: #fff;
    color: #454545;
    visibility: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
    height: 0 !important;
}

and it works...
Hi code Guruji,
you can see in that video I posted earlier these classes are being changed dynamically by the plugin so a static class will not work. you need a javascript to handle it. and its in the video.
 
AdBlock Detected

We get it, advertisements are annoying!

However in order to keep our huge array of resources free of charge we need to generate income from ads so to use the site you will need to turn off your adblocker.

If you'd like to have an ad free experience you can become a Babiato Lover by donating as little as $5 per month. Click on the Donate menu tab for more info.

I've Disabled AdBlock