Skip to content

Commit

Permalink
Release 2.0.2
Browse files Browse the repository at this point in the history
Allow disabling certain features of AlterVP.
  • Loading branch information
4yx committed Sep 2, 2022
1 parent 5d63db6 commit 787e3b3
Show file tree
Hide file tree
Showing 9 changed files with 53 additions and 38 deletions.
5 changes: 3 additions & 2 deletions altervp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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
Expand All @@ -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)
63 changes: 38 additions & 25 deletions altervp/altervp.js
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;
}
});
11 changes: 6 additions & 5 deletions altervp/altervp.min.js
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)});
2 changes: 1 addition & 1 deletion change-language-link-text-changer/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion change-password-link-text-changer/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion cpanel-logo-to-copyright/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion dropdown-bug-fix/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion responsive-domain-search/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tutorial-link-changer/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 787e3b3

Please sign in to comment.