Ticket #8 (closed feature: wontfix)
Strip numbers from URL
| Reported by: | guest | Owned by: | Cheez |
|---|---|---|---|
| Priority: | Low | Milestone: | 1.9 |
| Component: | HellaWorld | Version: | 1.8 |
| Keywords: | Cc: |
Description
I made a small Javascript which strips an url of it's characters, only leaving the numbers. You can use this as the file strip.js and call it with onChange="stripurl(this) on line 74 of templates/default.php Import the strip.js on line 57 with <script src="js/strip.js" type="text/javascript"></script>
function stripurl(newzbinurl) {
var strValidChars = "0123456789";
var strChar;
var newvalue='';
var nzbid = newzbinurl.value.substr(9); //ignorge first part of URL to strip the v3-part.
if (nzbid.length == 0) return;
for (i = 0; i < nzbid.length; i++) {
strChar = nzbid.charAt(i);
if (strValidChars.indexOf(strChar) > -1) {
newvalue = newvalue + strChar;
}
}
if (newvalue.length != 0) {
newzbinurl.value = newvalue;
}
}
Cheers, Lennard
Change History
Note: See
TracTickets for help on using
tickets.
