AA22Dev Posted April 22, 2018 Share Posted April 22, 2018 Hi, i wanted to know that how can i modify or remove the tutorials link in cpanel for my reseller account. Link to comment Share on other sites More sharing options...
AA22Dev Posted April 23, 2018 Author Share Posted April 23, 2018 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 More sharing options...
AA22Dev Posted April 24, 2018 Author Share Posted April 24, 2018 6 hours ago, PlanetCloud said: Then you've been implementing it incorrectly... ok, can you guide me? Link to comment Share on other sites More sharing options...
AA22Dev Posted April 24, 2018 Author Share Posted April 24, 2018 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 More sharing options...
AA22Dev Posted April 25, 2018 Author Share Posted April 25, 2018 11 hours ago, PlanetCloud said: Yes. It's better in the footer. Some dev says that the window.onload function is buggy on some non-popular browsers Ok, thanks for helping Link to comment Share on other sites More sharing options...
AA22Dev Posted April 25, 2018 Author Share Posted April 25, 2018 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 More sharing options...
mike Posted April 25, 2018 Share Posted April 25, 2018 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 More sharing options...
AA22Dev Posted April 25, 2018 Author Share Posted April 25, 2018 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 More sharing options...
AA22Dev Posted April 26, 2018 Author Share Posted April 26, 2018 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 More sharing options...
AA22Dev Posted April 26, 2018 Author Share Posted April 26, 2018 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 More sharing options...
AA22Dev Posted April 26, 2018 Author Share Posted April 26, 2018 <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 More sharing options...
AA22Dev Posted April 27, 2018 Author Share Posted April 27, 2018 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 More sharing options...
AA22Dev Posted May 2, 2018 Author Share Posted May 2, 2018 I did it by calling a js file in the header Link to comment Share on other sites More sharing options...
AA22Dev Posted May 3, 2018 Author Share Posted May 3, 2018 7 hours ago, PlanetCloud said: Contragulations! Thanks Link to comment Share on other sites More sharing options...
Recommended Posts