Page MenuHomePhabricator

D3335.id10077.diff
No OneTemporary

D3335.id10077.diff

diff --git a/lib/utils/url-utils.js b/lib/utils/url-utils.js
--- a/lib/utils/url-utils.js
+++ b/lib/utils/url-utils.js
@@ -9,6 +9,7 @@
calendar?: boolean,
chat?: boolean,
thread?: string,
+ settings?: 'account',
...
};
@@ -18,6 +19,7 @@
const verifyRegex = new RegExp('(/|^)verify/([a-f0-9]+)(/|$)', 'i');
const calendarRegex = new RegExp('(/|^)calendar(/|$)', 'i');
const chatRegex = new RegExp('(/|^)chat(/|$)', 'i');
+const accountSettingsRegex = new RegExp('(/|^)settings/account(/|$)', 'i');
function infoFromURL(url: string): URLInfo {
const yearMatches = yearRegex.exec(url);
@@ -26,6 +28,7 @@
const verifyMatches = verifyRegex.exec(url);
const calendarTest = calendarRegex.test(url);
const chatTest = chatRegex.test(url);
+ const accountSettingsTest = accountSettingsRegex.test(url);
const returnObj = {};
if (yearMatches) {
returnObj.year = parseInt(yearMatches[2], 10);
@@ -47,6 +50,8 @@
returnObj.calendar = true;
} else if (chatTest) {
returnObj.chat = true;
+ } else if (accountSettingsTest) {
+ returnObj.settings = 'account';
}
return returnObj;
}

File Metadata

Mime Type
text/plain
Expires
Thu, Dec 19, 1:42 PM (20 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2677575
Default Alt Text
D3335.id10077.diff (1 KB)

Event Timeline