mirror of
https://codeberg.org/teddit/teddit.git
synced 2026-03-05 13:30:33 -05:00
Add Quetre option
This commit is contained in:
@@ -193,6 +193,7 @@ module.exports = function(request, fs) {
|
||||
let youtubeRegex = /(?<=href=")(https?:\/\/)([A-z.]+\.)?youtu(be\.com|\.be)(?=.+")/gm;
|
||||
let twitterRegex = /(?<=href=")(https?:\/\/)(www\.)?twitter\.com(?=.+")/gm;
|
||||
let instagramRegex = /(?<=href=")(https?:\/\/)(www+\.)?instagram.com(?=.+")/gm;
|
||||
let quoraRegex = /(?<=href=")(https?:\/\/)([A-z.]+\.)?quora\.com(?=.+")/gm;
|
||||
|
||||
let protocol = config.https_enabled || config.api_force_https ? 'https://' : 'http://'
|
||||
|
||||
@@ -260,6 +261,10 @@ module.exports = function(request, fs) {
|
||||
if(user_preferences.domain_instagram)
|
||||
str = str.replace(instagramRegex, protocol + user_preferences.domain_instagram)
|
||||
|
||||
if(typeof(user_preferences.domain_quora) != 'undefined')
|
||||
if(user_preferences.domain_quora)
|
||||
str = str.replace(quoraRegex, protocol + user_preferences.domain_quora)
|
||||
|
||||
return str
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user