From 0083f767b3e538a01db91a043ba58c30516b37b2 Mon Sep 17 00:00:00 2001 From: Ave Ozkal Date: Fri, 11 Oct 2019 10:30:42 +0300 Subject: [PATCH] Make pronoun.is pronouns look a little better --- pronoun-assistant/pronoun-assistant.user.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pronoun-assistant/pronoun-assistant.user.js b/pronoun-assistant/pronoun-assistant.user.js index bb95f3d..a47ed0b 100644 --- a/pronoun-assistant/pronoun-assistant.user.js +++ b/pronoun-assistant/pronoun-assistant.user.js @@ -49,7 +49,7 @@ let allPronouns = [ "xey", "xem", "xyr" ].join("|"); let pronounListRegex = new RegExp('\\W*((' + allPronouns + ')(\\s*/\\s*(' + allPronouns + '))+)\\W*', 'i'); -let myPronounIsRegex = /(https?:\/\/)?(my\.)?pronoun\.is\/[\w/]+/i; +let myPronounIsRegex = /(https?:\/\/)?(my\.)?pronoun\.is\/([\w/]+)/i; let explicitPronounsRegex = /pronouns:\s*([^.\n]*)(\.|\n|$)/im; // Keys: user IDs @@ -76,7 +76,7 @@ function getPronouns(aboutMe) { // http://my.pronoun.is/she var match = myPronounIsRegex.exec(aboutMe); if (match != null) { - return match[0]; + return match[3]; } // Explicit pronouns specification, e.g.