From 5219dde953e96fe833c684abede54805b6c22f5f Mon Sep 17 00:00:00 2001 From: Avril Date: Wed, 19 Aug 2020 23:39:04 +0100 Subject: [PATCH] added faq link --- common.js | 5 ++++- server/server.js | 8 ++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/common.js b/common.js index 3757b3d..1027e75 100644 --- a/common.js +++ b/common.js @@ -202,7 +202,7 @@ var OS = OneeSama.prototype; var break_re = new RegExp("(\\S{" + DEFINES.WORD_LENGTH_LIMIT + "})"); /* internal refs, embeds */ -var ref_re = />>(\d+|>\/s\/.+|>\/music\/s\/.+|>\/watch\?v=[\w-]{11}(?:#t=[\dhms]{1,9})?|>\/soundcloud\/[\w-]{1,40}\/[\w-]{1,80}|>\/@\w{1,15}\/\d{4,20}(?:\?s=\d+)?|>\/(?:a|sysint|nap)\/\d{0,10})/; +var ref_re = />>(\d+|>\/s\/.+|>\/music\/s\/.+|>\/watch\?v=[\w-]{11}(?:#t=[\dhms]{1,9})?|>\/soundcloud\/[\w-]{1,40}\/[\w-]{1,80}|>\/@\w{1,15}\/\d{4,20}(?:\?s=\d+)?|>\/(?:a|sysint|nap)\/\d{0,10}|>\/rurus\/)/; OS.hook = function (name, func) { var hs = this.hooks[name]; @@ -263,6 +263,9 @@ OS.red_string = function (ref) { var num = parseInt(ref.slice(4+2), 10); dest = '../outbound/nap/' + (num ? ''+num : ''); } + else if (prefix == '>/r') { + dest ="/faq.html"; + } else { this.tamashii(parseInt(ref, 10)); return; diff --git a/server/server.js b/server/server.js index afaf417..425b2af 100644 --- a/server/server.js +++ b/server/server.js @@ -608,6 +608,14 @@ web.resource(/^\/outbound\/sysint\/(\d{0,10})$/, function (req, params, cb) { cb(null, 303.1, url); }); +web.resource(/^\/outbound\/rurus\/(\d{0,10})$/, function (req, params, cb) { + var thread = parseInt(params[1], 10); + var url = '/faq.html'; + if (thread) + url += thread; + cb(null, 303.1, url); +}); + web.resource(/^\/outbound\/nap\/(\d{0,10})$/, function (req, params, cb) { var thread = parseInt(params[1], 10); var url = 'https://nineball.party/nap/';