-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow disabling certain features of AlterVP.
- Loading branch information
Showing
9 changed files
with
53 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,7 +32,7 @@ const AlterVP = { | |
} | ||
}; | ||
``` | ||
Replace the values inside with the ones you want for your panel. | ||
Replace the values inside with the ones you want for your panel. You can comment out the lines of the features you do not wish to use. | ||
|
||
Afterwards, create a script tag with `src` pointing to `altervp.js` or `altervp.min.js` for the minified version. | ||
|
||
|
@@ -57,7 +57,7 @@ const AlterVP = { | |
} | ||
}; | ||
</script> | ||
<script src="https://cdn.jsdelivr.net/gh/WybeNetwork/[email protected].1/altervp/altervp.js" type="text/javascript"></script> | ||
<script src="https://cdn.jsdelivr.net/gh/WybeNetwork/[email protected].2/altervp/altervp.js" type="text/javascript"></script> | ||
``` | ||
Alternatively, you can use our CDN: | ||
```html | ||
|
@@ -83,3 +83,4 @@ Feel free to remove the comment line symbol (``//``) that explains the type of t | |
* Modified on 14 September 2018 by [woxly](https://github.com/woxly) | ||
* Lost in time | ||
* Recreated on 30 August 2022 by [Anyx](https://github.com/4yx) | ||
* Last modified on 3 September 2022 by [Anyx](https://github.com/4yx) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,53 @@ | ||
/* | ||
* Created on 14 September 2018 by woxly | ||
* Recreated on 30 August 2022 by Anyx | ||
* Modified on 3 September 2022 by Anyx | ||
* DO NOT REMOVE CREDITS! | ||
*/ | ||
document.addEventListener("DOMContentLoaded", function() { | ||
// Title | ||
document.title = AlterVP.title; | ||
if (AlterVP.title !== undefined) { | ||
document.title = AlterVP.title; | ||
} | ||
// Protocol | ||
if (window.location.protocol.replace(/:/g,'') !== AlterVP.protocol) { | ||
location.protocol = AlterVP.protocol; | ||
if (AlterVP.protocol !== undefined) { | ||
if (window.location.protocol.replace(/:/g,'') !== AlterVP.protocol) { | ||
location.protocol = AlterVP.protocol; | ||
} | ||
} | ||
// Logo | ||
document.getElementById("imgLogo").src = AlterVP.logo; | ||
if (AlterVP.logo !== undefined) { | ||
document.getElementById("imgLogo").src = AlterVP.logo; | ||
} | ||
// Themes | ||
if (AlterVP.category !== "lightspace") { | ||
themeURL = ['https://vpt.cdn.wybenetwork.com', AlterVP.theme, 'styles.css'].join("/"); | ||
if (AlterVP.category == "normal") { | ||
iconURL = ['https://vpt.cdn.wybenetwork.com', AlterVP.theme, 'icon_spritemap.css'].join("/"); | ||
icon = document.createElement('link'); | ||
icon.type = 'text/css'; | ||
icon.rel = 'stylesheet'; | ||
icon.href = iconURL; | ||
document.head.appendChild(icon); | ||
if (AlterVP.theme !== undefined && AlterVP.category !== undefined) { | ||
if (AlterVP.category !== "lightspace") { | ||
themeURL = ['https://vpt.cdn.wybenetwork.com', AlterVP.theme, 'styles.css'].join("/"); | ||
if (AlterVP.category == "normal") { | ||
iconURL = ['https://vpt.cdn.wybenetwork.com', AlterVP.theme, 'icon_spritemap.css'].join("/"); | ||
icon = document.createElement('link'); | ||
icon.type = 'text/css'; | ||
icon.rel = 'stylesheet'; | ||
icon.href = iconURL; | ||
document.head.appendChild(icon); | ||
} | ||
} else { | ||
themeURL = ['https://vpt.cdn.wybenetwork.com', AlterVP.theme, 'panel.css'].join("/"); | ||
} | ||
} else { | ||
themeURL = ['https://vpt.cdn.wybenetwork.com', AlterVP.theme, 'panel.css'].join("/"); | ||
theme = document.createElement('link'); | ||
theme.type = 'text/css'; | ||
theme.rel = 'stylesheet'; | ||
theme.href = themeURL; | ||
document.head.appendChild(theme); | ||
} | ||
theme = document.createElement('link'); | ||
theme.type = 'text/css'; | ||
theme.rel = 'stylesheet'; | ||
theme.href = themeURL; | ||
document.head.appendChild(theme); | ||
// Credits | ||
script = document.createElement('script') | ||
script.setAttribute('type', 'text/javascript') | ||
script.innerHTML = "window.addEventListener('load',function(){document.getElementById('imgPoweredByCpanel').src=AlterVP.credits.logo})" | ||
document.body.appendChild(script) | ||
document.getElementById("txtCpanelVersion").innerHTML = AlterVP.credits.desc; | ||
if (AlterVP.credits.logo !== undefined) { | ||
script = document.createElement('script') | ||
script.setAttribute('type', 'text/javascript') | ||
script.innerHTML = "window.addEventListener('load',function(){document.getElementById('imgPoweredByCpanel').src=AlterVP.credits.logo,document.getElementById('txtCpanelVersion').innerHTML=AlterVP.credits.desc})" | ||
document.body.appendChild(script) | ||
} | ||
if (AlterVP.credits.desc !== undefined) { | ||
document.getElementById("txtCpanelVersion").innerHTML = AlterVP.credits.desc; | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
/* | ||
* Created on 14 September 2018 by woxly | ||
* Recreated on 30 August 2022 by Anyx | ||
* Modified on 3 September 2022 by Anyx | ||
* DO NOT REMOVE CREDITS! | ||
*/ | ||
document.addEventListener("DOMContentLoaded",function(){ | ||
// Title | ||
document.title=AlterVP.title, | ||
void 0!==AlterVP.title&&(document.title=AlterVP.title), | ||
// Protocol | ||
window.location.protocol.replace(/:/g,"")!==AlterVP.protocol&&(location.protocol=AlterVP.protocol), | ||
void 0!==AlterVP.protocol&&window.location.protocol.replace(/:/g,"")!==AlterVP.protocol&&(location.protocol=AlterVP.protocol), | ||
// Logo | ||
document.getElementById("imgLogo").src=AlterVP.logo, | ||
void 0!==AlterVP.logo&&(document.getElementById("imgLogo").src=AlterVP.logo), | ||
// Themes | ||
"lightspace"!==AlterVP.category?(themeURL=["https://vpt.cdn.wybenetwork.com",AlterVP.theme,"styles.css"].join("/"),"normal"==AlterVP.category&&(iconURL=["https://vpt.cdn.wybenetwork.com",AlterVP.theme,"icon_spritemap.css"].join("/"),icon=document.createElement("link"),icon.type="text/css",icon.rel="stylesheet",icon.href=iconURL,document.head.appendChild(icon))):themeURL=["https://vpt.cdn.wybenetwork.com",AlterVP.theme,"panel.css"].join("/"),theme=document.createElement("link"),theme.type="text/css",theme.rel="stylesheet",theme.href=themeURL,document.head.appendChild(theme), | ||
void 0!==AlterVP.theme&&void 0!==AlterVP.category&&("lightspace"!==AlterVP.category?(themeURL=["https://vpt.cdn.wybenetwork.com",AlterVP.theme,"styles.css"].join("/"),"normal"==AlterVP.category&&(iconURL=["https://vpt.cdn.wybenetwork.com",AlterVP.theme,"icon_spritemap.css"].join("/"),icon=document.createElement("link"),icon.type="text/css",icon.rel="stylesheet",icon.href=iconURL,document.head.appendChild(icon))):themeURL=["https://vpt.cdn.wybenetwork.com",AlterVP.theme,"panel.css"].join("/"),theme=document.createElement("link"),theme.type="text/css",theme.rel="stylesheet",theme.href=themeURL,document.head.appendChild(theme)), | ||
// Credits | ||
script=document.createElement("script"),script.setAttribute("type","text/javascript"),script.innerHTML="window.addEventListener('load',function(){document.getElementById('imgPoweredByCpanel').src=AlterVP.credits.logo})",document.body.appendChild(script),document.getElementById("txtCpanelVersion").innerHTML=AlterVP.credits.desc}); | ||
void 0!==AlterVP.credits.logo&&(script=document.createElement("script"),script.setAttribute("type","text/javascript"),script.innerHTML="window.addEventListener('load',function(){document.getElementById('imgPoweredByCpanel').src=AlterVP.credits.logo,document.getElementById('txtCpanelVersion').innerHTML=AlterVP.credits.desc})",document.body.appendChild(script)),void 0!==AlterVP.credits.desc&&(document.getElementById("txtCpanelVersion").innerHTML=AlterVP.credits.desc)}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,7 @@ The full code, using jsDelivr: | |
var change_language_link = "your_website_url", | ||
change_language_text = "your_text"; | ||
</script> | ||
<script src="https://cdn.jsdelivr.net/gh/WybeNetwork/[email protected].1/change-language-link-text-changer/change-language-link-text-changer.js" type="text/javascript"></script> | ||
<script src="https://cdn.jsdelivr.net/gh/WybeNetwork/[email protected].2/change-language-link-text-changer/change-language-link-text-changer.js" type="text/javascript"></script> | ||
``` | ||
Alternatively, you can use our CDN: | ||
```html | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,7 @@ The full code, using jsDelivr: | |
var change_password_link = "your_website_url", | ||
change_password_text = "your_text"; | ||
</script> | ||
<script src="https://cdn.jsdelivr.net/gh/WybeNetwork/[email protected].1/change-password-link-text-changer/change-password-link-text-changer.js" type="text/javascript"></script> | ||
<script src="https://cdn.jsdelivr.net/gh/WybeNetwork/[email protected].2/change-password-link-text-changer/change-password-link-text-changer.js" type="text/javascript"></script> | ||
``` | ||
Alternatively, you can use our CDN: | ||
```html | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,7 +46,7 @@ The full code, using jsDelivr: | |
} | ||
</script> | ||
<script src="https://cdn.jsdelivr.net/gh/WybeNetwork/[email protected].1/cpanel-logo-to-copyright/cpanel-logo-to-copyright.js" type="text/javascript"></script> | ||
<script src="https://cdn.jsdelivr.net/gh/WybeNetwork/[email protected].2/cpanel-logo-to-copyright/cpanel-logo-to-copyright.js" type="text/javascript"></script> | ||
``` | ||
Alternatively, you can use our CDN: | ||
```html | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ To solve this, we need an external service which adds the correct type, like jsD | |
|
||
The full code, using jsDelivr: | ||
```html | ||
<script src="https://cdn.jsdelivr.net/gh/WybeNetwork/[email protected].1/dropdown-bug-fix/dropdown-bug-fix.js" type="text/javascript"></script> | ||
<script src="https://cdn.jsdelivr.net/gh/WybeNetwork/[email protected].2/dropdown-bug-fix/dropdown-bug-fix.js" type="text/javascript"></script> | ||
``` | ||
Alternatively, you can use our CDN: | ||
```html | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,7 +32,7 @@ The full code, using jsDelivr: | |
affCode = "AFFILIATE_CODE_HERE"; | ||
*/ | ||
</script> | ||
<script src="https://cdn.jsdelivr.net/gh/WybeNetwork/[email protected].1/responsive-domain-search/responsive-domain-search.js" type="text/javascript"></script> | ||
<script src="https://cdn.jsdelivr.net/gh/WybeNetwork/[email protected].2/responsive-domain-search/responsive-domain-search.js" type="text/javascript"></script> | ||
``` | ||
Alternatively, you can use our CDN: | ||
```html | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,7 +37,7 @@ The full code, using jsDelivr: | |
tutorial : "YOUR TUTORIAL LINK WITH HTTP(S) PROTOCOL", | ||
} | ||
</script> | ||
<script src="https://cdn.jsdelivr.net/gh/WybeNetwork/[email protected].1/tutorial-link-changer/tutorial-link-changer.js" type="text/javascript"></script> | ||
<script src="https://cdn.jsdelivr.net/gh/WybeNetwork/[email protected].2/tutorial-link-changer/tutorial-link-changer.js" type="text/javascript"></script> | ||
``` | ||
Alternatively, you can use our CDN: | ||
```html | ||
|