Jump to content
[MUST READ] Forum Rules ×

How to modify or remove tutorials link in cPanel


AA22Dev

Recommended Posts

14 hours ago, PlanetCloud said:

I belive that can be done using JS but I had lost track of the file to modify it...
You can try to experiment with JS and I think it's preety straightforward process.

I had tried to use JS but it create another block of support.

Link to comment
Share on other sites

9 hours ago, PlanetCloud said:

Here's what I've used :


foreach(document.querySelectorAll('a[href^="https://tutorials.securesignup.net"]'), function(t) {
    t.setAttribute("href", "TUTORIAL_DOMAIN_HERE")
})

Make sure everything is loaded first, then run the script.
It will look something like this :


window.onload = function(e){ 
    foreach(document.querySelectorAll('a[href^="https://tutorials.securesignup.net"]'), function(t) {
        t.setAttribute("href", "TUTORIAL_DOMAIN_HERE")
    }) 
}

Hope this helps.

ok, thanks. Seems like i have to use it in footer

Link to comment
Share on other sites

On 4/24/2018 at 2:54 PM, PlanetCloud said:

Here's what I've used :


foreach(document.querySelectorAll('a[href^="https://tutorials.securesignup.net"]'), function(t) {
    t.setAttribute("href", "TUTORIAL_DOMAIN_HERE")
})

Make sure everything is loaded first, then run the script.
It will look something like this :


window.onload = function(e){ 
    foreach(document.querySelectorAll('a[href^="https://tutorials.securesignup.net"]'), function(t) {
        t.setAttribute("href", "TUTORIAL_DOMAIN_HERE")
    }) 
}

Hope this helps.

This code is not working

Link to comment
Share on other sites

4 hours ago, Aqib said:

This code is not working

Make sure you have waited around 15-30 min since you saved the code in the footer ( it usually takes this long to update the code ). Also, check your cache, just in case it's that.

Link to comment
Share on other sites

3 minutes ago, mike said:

Make sure you have waited around 15-30 min since you saved the code in the footer ( it usually takes this long to update the code ). Also, check your cache, just in case it's that.

Ok, thanks i will check it.

Link to comment
Share on other sites

11 hours ago, mike said:

Make sure you have waited around 15-30 min since you saved the code in the footer ( it usually takes this long to update the code ). Also, check your cache, just in case it's that.

This code is still not working. I waited alot after putting this code. I am using the latest version of chrome. I also try Microsoft Edge.

Link to comment
Share on other sites

5 minutes ago, PlanetCloud said:

Have you checked the source and make sure that the code is in place?
Also to my knowledge, that code will only appear to user that registered POST adding the script.

Yes, the code is present in the footer.

I added this code

<script type"javascript">
window.onload = function(e){ 
    foreach(document.querySelectorAll('a[href^="https://tutorials.securesignup.net"]'), function(t) {
        t.setAttribute("href", "https://portal.mahhost.win/index.php?rp=/knowledgebase")
    }) 
}
</script>

 

Link to comment
Share on other sites

<script type="javascript">
window.onload = function(e){ 
    foreach(document.querySelectorAll('a[href^="https://tutorials.securesignup.net"]'), function(t) {
        t.setAttribute("href", "https://example.com")
    }) 
}
</script>

 

Link to comment
Share on other sites

10 hours ago, PlanetCloud said:

Try checking your console (F12/Inspector -> Console) and see if there's any error logged.
 

These are error logged in my console window

Failed to load resource: the server responded with a status of 404 (Not Found)
2indexpl.php?id=9c4fa294b447dcb6d91f83c87210b75c71eb4727:736 A parser-blocking, cross site (i.e. different eTLD+1) script, https://secure.statcounter.com/counter/counter.js, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details.
(anonymous) @ indexpl.php?id=9c4fa294b447dcb6d91f83c87210b75c71eb4727:736
/execute/Notifications/get_notifications_count?cache-fix=0.3257630838685297 Failed to load resource: the server responded with a status of 404 (Not Found)

But they have nothing to relate with that script

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...