summaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
authoryorhel <yorhel@1fe2e327-d9db-4752-bcf7-ef0cb4a1748b>2008-06-30 10:02:06 +0000
committeryorhel <yorhel@1fe2e327-d9db-4752-bcf7-ef0cb4a1748b>2008-06-30 10:02:06 +0000
commit5fd0fb77b025faf71946df483296f24e756e3657 (patch)
treedf77cc322ab8bbb2b4864d5359fee8470b0db6d3 /static
parent0c5cd15570ea2b741b86c6cff8dbc5d9365a4cc6 (diff)
Fixed a few typos, the edit summary is optional again, and added warnings for extreme votes and empty edit summaries
git-svn-id: svn://vndb.org/vndb@47 1fe2e327-d9db-4752-bcf7-ef0cb4a1748b
Diffstat (limited to 'static')
-rw-r--r--static/files/def.js28
1 files changed, 23 insertions, 5 deletions
diff --git a/static/files/def.js b/static/files/def.js
index 39772b9a..a6f80ae4 100644
--- a/static/files/def.js
+++ b/static/files/def.js
@@ -228,7 +228,7 @@ DOMLoad(function() {
// vnlist
cl('askcomment', function() {
- this.href = this.href + '&amp;c=' + encodeURIComponent(prompt("Enter personal note (optional)", '')||'');
+ this.href = this.href + ';c=' + encodeURIComponent(prompt("Enter personal note (optional)", '')||'');
return true;
});
@@ -253,9 +253,16 @@ DOMLoad(function() {
}
}
- // confirm popup
- cl('idel', function () {
- return confirm('Are you sure you want to delete this item?\n\nAll previous edits will be deleted, this action can not be reverted!') });
+ // vote warnings
+ cl('dovote_10', function() { return confirm(
+ "You are about to give this visual novel a 10 out of 10. This is a rather extreme rating, "
+ +"meaning this is one of the best visual novels you've ever played and it's unlikely "
+ +"that any other game could ever be better than this one.\n"
+ +"It is generally a bad idea to have more than three games in your vote list with this rating, choose carefully!") });
+ cl('dovote_1', function() { return confirm(
+ "You are about to give this visual novel a 1 out of 10. This is a rather extreme rating, "
+ +"meaning this game has absolutely nothing to offer, and that it's the worst game you have ever played.\n"
+ +"Are you really sure this visual novel matches that description?") });
// NSFW
cl('nsfw', function () {
@@ -277,8 +284,19 @@ DOMLoad(function() {
}
// form-stuff
- if(document.forms.length > 1)
+ if(document.forms.length > 1) {
formhid();
+ // edit summary warning
+ if(x('comm'))
+ document.forms[1].onsubmit = function () {
+ var z = x('comm');
+ if(z.value.length > 5) return true;
+ var y = prompt("Edit summary field is empty,\nPlease explain your edits and cite all sources!", z.value);
+ if(y == null) return false;
+ z.value = y;
+ return true;
+ };
+ }
// init dyna
if(window.dInit)