From 753ac9039a96310138ba3d16243b0c1b4ce4c3bd Mon Sep 17 00:00:00 2001 From: ccd0 Date: Wed, 13 Aug 2014 22:56:11 -0700 Subject: [PATCH] relabel email field to options --- src/General/Config.coffee | 4 ++-- src/General/html/Features/QuickReply.html | 2 +- src/General/html/Settings/Advanced.html | 8 ++++---- src/Posting/QR.coffee | 1 + src/Posting/QR.persona.coffee | 5 +++-- 5 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/General/Config.coffee b/src/General/Config.coffee index 7881bc9e6..60e87a974 100755 --- a/src/General/Config.coffee +++ b/src/General/Config.coffee @@ -329,7 +329,7 @@ Config = ] 'Show Name and Subject': [ false - 'Always show name and subject fields in the QR even when 4chan doesn\'t use them.' + 'Show the classic name, email, and subject fields in the QR, even when 4chan doesn\'t use them all.' ] 'Hide Original Post Form': [ true @@ -601,7 +601,7 @@ vp-replace QR: 'QR.personas': """ - #email:"sage";boards:jp;always + #options:"sage";boards:jp;always """ time: '%m/%d/%y(%a)%H:%M:%S' diff --git a/src/General/html/Features/QuickReply.html b/src/General/html/Features/QuickReply.html index 1a49438a7..4ec950149 100755 --- a/src/General/html/Features/QuickReply.html +++ b/src/General/html/Features/QuickReply.html @@ -11,7 +11,7 @@
- +
diff --git a/src/General/html/Settings/Advanced.html b/src/General/html/Settings/Advanced.html index 18e5c2ccf..9075d1344 100755 --- a/src/General/html/Settings/Advanced.html +++ b/src/General/html/Settings/Advanced.html @@ -75,10 +75,10 @@ Lines starting with a # will be ignored.

    You can use these settings with each item, separate them with semicolons: -
  • Possible items are: name, email, subject and password.
  • -
  • Wrap values of items with quotes, like this: email:"sage".
  • -
  • Force values as defaults with the always keyword, for example: email:"sage";always.
  • -
  • Select specific boards for an item, separated with commas, for example: email:"sage";boards:jp;always.
  • +
  • Possible items are: name, options (or equivalently email), subject and password.
  • +
  • Wrap values of items with quotes, like this: options:"sage".
  • +
  • Force values as defaults with the always keyword, for example: options:"sage";always.
  • +
  • Select specific boards for an item, separated with commas, for example: options:"sage";boards:jp;always.
diff --git a/src/Posting/QR.coffee b/src/Posting/QR.coffee index aa77597b8..712ac76d1 100644 --- a/src/Posting/QR.coffee +++ b/src/Posting/QR.coffee @@ -472,6 +472,7 @@ QR = if Conf['Show Name and Subject'] $.addClass QR.nodes.name, 'force-show' $.addClass QR.nodes.sub, 'force-show' + QR.nodes.email.placeholder = 'E-mail' QR.forcedAnon = !!$ '.postForm input[name=name][type=hidden]' if QR.forcedAnon diff --git a/src/Posting/QR.persona.coffee b/src/Posting/QR.persona.coffee index 31de73322..cc382318f 100644 --- a/src/Posting/QR.persona.coffee +++ b/src/Posting/QR.persona.coffee @@ -16,7 +16,7 @@ QR.persona = parseItem: (item, types) -> return if item[0] is '#' - return unless match = item.match /(name|email|subject|password):"(.*)"/i + return unless match = item.match /(name|options|email|subject|password):"(.*)"/i [match, type, val] = match # Don't mix up item settings with val. @@ -30,7 +30,8 @@ QR.persona = QR.persona.pwd = val return - type = 'sub' if type is 'subject' + type = 'email' if type is 'options' + type = 'sub' if type is 'subject' if /always/i.test item QR.persona.always[type] = val