mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Guides: initial implementation
* a guide is a wrapper around an article providing management tools. * administration is limited to the review process. Needs to be expanded. * articles on DB pages are seperate. Editor will be added in the future.
This commit is contained in:
19
static/js/admin.js
Normal file
19
static/js/admin.js
Normal file
@@ -0,0 +1,19 @@
|
||||
function ar_IsValidUrl(a) {
|
||||
return a.match(/^[a-z0-9=_&\.\/\-]{2,64}$/i) != null;
|
||||
}
|
||||
|
||||
function ar_ValidateUrl(a) {
|
||||
if (ar_IsValidUrl(a)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (a.length < 2) {
|
||||
return "URL must be at least 2 characters long.";
|
||||
}
|
||||
else if (a.length > 64) {
|
||||
return "URL must be at most 64 characters long.";
|
||||
}
|
||||
else {
|
||||
return "You used invalid characters in your URL.\n\nYou can only use the following:\n a to z\n 0 to 9\n = _ & . / -"
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user