summaryrefslogtreecommitdiff
path: root/packages/frontend/src/pages
diff options
context:
space:
mode:
Diffstat (limited to 'packages/frontend/src/pages')
-rw-r--r--packages/frontend/src/pages/share.vue19
1 files changed, 15 insertions, 4 deletions
diff --git a/packages/frontend/src/pages/share.vue b/packages/frontend/src/pages/share.vue
index 71f572657b..51ac9d66f0 100644
--- a/packages/frontend/src/pages/share.vue
+++ b/packages/frontend/src/pages/share.vue
@@ -59,10 +59,21 @@ const visibleUsers = ref([] as Misskey.entities.UserDetailed[]);
async function init() {
let noteText = '';
- if (title.value) noteText += `[ ${title.value} ]\n`;
- // Googleニュース対策
- if (text?.startsWith(`${title.value}.\n`)) noteText += text.replace(`${title.value}.\n`, '');
- else if (text && title.value !== text) noteText += `${text}\n`;
+ if (title.value) {
+ noteText += `[ ${title.value} ]\n`;
+
+ //#region add text to note text
+ if (text?.startsWith(title.value)) {
+ // For the Google app https://github.com/misskey-dev/misskey/issues/16224
+ noteText += text.replace(title.value, '').trimStart();
+ } else if (text) {
+ noteText += `${text}\n`;
+ }
+ //#endregion
+ } else if (text) {
+ noteText += `${text}\n`;
+ }
+
if (url) {
try {
// Normalize the URL to URL-encoded and puny-coded from with the URL constructor.