├── README.md ├── TextLinkyTool ├── _locales │ ├── en │ │ └── messages.json │ ├── en_GB │ │ └── messages.json │ ├── ja │ │ └── messages.json │ ├── ru │ │ └── messages.json │ ├── zh_CN │ │ └── messages.json │ └── zh_TW │ │ └── messages.json ├── background.js ├── common.js ├── content.js ├── icons │ ├── icon16.png │ ├── icon32.png │ ├── icon48.png │ └── icon96.png ├── imglist.css ├── imglist.html ├── imglist.js ├── manifest.json ├── options.css ├── options.html └── options.js └── change.log /README.md: -------------------------------------------------------------------------------- 1 | **Text Linky Tool** 2 | --- 3 | A useful tool for web links. 4 | 5 | Home Page:https://github.com/Yukisama/TextLinkyTool 6 | Firefox Extension:https://addons.mozilla.org/addon/text-linky-tool 7 | Chrome Extension:not yet. cf [Chrome bug 328932](https://bugs.chromium.org/p/chromium/issues/detail?id=328932) and [Chrome bug 798169](https://bugs.chromium.org/p/chromium/issues/detail?id=798169) 8 | 9 | Features: 10 | 11 | Copy as plain text. 12 | Copy as HTML source. 13 | Copy Link name & URLs. 14 | Copy Tab name & URLs. 15 | Analyze image URLs of page. 16 | 17 | Over 20 actions: 18 | 19 | 1. Copy selected context as pure text 20 | 2. Copy selected context as HTML source text 21 | 3. Copy full page context as pure text 22 | 4. Copy full page context as HTML source text 23 | 5. Copy Link name 24 | 6. Copy Link URL 25 | 7. Copy Link name & URL as format text 26 | 8. Copy Image URL 27 | 9. Open Image on new Tab 28 | 10. Copy Tab name 29 | 11. Copy Tab URL 30 | 12. Copy Tab name & URL as format text 31 | 13. Copy all Tabs info 32 | 14. Analyze selected context URLs, copy as format text 33 | 15. Analyze selected context URLs, open to new Tabs 34 | 16. Analyze selected context image URLs, copy as format text 35 | 17. Analyze selected context image URLs, show on new Tab 36 | 18. Analyze selected context a objects, copy as format text 37 | 19. Analyze selected context img objects, copy as format text 38 | 20. Analyze full page context URLs, copy as format text 39 | 21. Analyze full page context URLs, open to new Tabs 40 | 22. Analyze full page context image URLs, copy as format text 41 | 23. Analyze full page context image URLs, show on new Tab 42 | 24. Analyze full page context a objects, copy as format text 43 | 25. Analyze full page context img objects, copy as format text 44 | ... and more 45 | 46 | 47 | -------------------------------------------------------------------------------- /TextLinkyTool/_locales/en/messages.json: -------------------------------------------------------------------------------- 1 | { 2 | "copySelectedPuretext": { 3 | "message": "Copy context as pure text", 4 | "description": "feature - Copy text without HTML format of selected context." 5 | }, 6 | "copySelectedHtmltext": { 7 | "message": "Copy context as HTML text", 8 | "description": "feature - Copy HTML source text of selected context." 9 | }, 10 | "copyPagePuretext": { 11 | "message": "Copy page as pure text", 12 | "description": "feature - Copy text without HTML format of full page." 13 | }, 14 | "copyPageHtmltext": { 15 | "message": "Copy page as HTML text", 16 | "description": "feature - Copy HTML source text of full page." 17 | }, 18 | "copyLinkName": { 19 | "message": "Copy Link name", 20 | "description": "feature - Copy name of this Link." 21 | }, 22 | "copyLinkUrl": { 23 | "message": "Copy Link URL", 24 | "description": "feature - Copy URL of this Link." 25 | }, 26 | "copyLinkFormatText": { 27 | "message": "Copy Link as {0}", 28 | "description": "feature - Copy name & URL as custom format text of this Link." 29 | }, 30 | "copyImageUrl": { 31 | "message": "Copy Image URL", 32 | "description": "feature - Copy URL of this Image." 33 | }, 34 | "showImage": { 35 | "message": "Show Image", 36 | "description": "feature - Open Image on new Tab." 37 | }, 38 | "copyTabName": { 39 | "message": "Copy Tab name", 40 | "description": "feature - Copy name of this Tab." 41 | }, 42 | "copyTabUrl": { 43 | "message": "Copy Tab URL", 44 | "description": "feature - Copy URL of this Tab." 45 | }, 46 | "copyTabFormatText": { 47 | "message": "Copy Tab as {0}", 48 | "description": "feature - Copy name & URL as custom format text of this Tab." 49 | }, 50 | "copyAllTabsInfo": { 51 | "message": "Copy all Tabs info ({0})", 52 | "description": "feature - Copy all Tabs info." 53 | }, 54 | "copySelectedUrls": { 55 | "message": "Copy selected URLs ({0})", 56 | "description": "feature - Analyze selected context to find URLs, copy all as custom format text." 57 | }, 58 | "openSelectedUrls": { 59 | "message": "Open selected URLs", 60 | "description": "feature - Analyze selected context to find URLs, open all to new Tabs." 61 | }, 62 | "copyPageUrls": { 63 | "message": "Copy page URLs ({0})", 64 | "description": "feature - Analyze full page to find URLs, copy all as custom format text." 65 | }, 66 | "openPageUrls": { 67 | "message": "Open page URLs", 68 | "description": "feature - Analyze full page to find URLs, open all to new Tabs." 69 | }, 70 | "copySelectedImageUrls": { 71 | "message": "Copy selected image URLs ({0})", 72 | "description": "feature - Analyze selected context to find image URLs, copy all as custom format text." 73 | }, 74 | "showSelectedImages": { 75 | "message": "Show selected images", 76 | "description": "feature - Analyze selected context to find image URLs, open all to new Tabs." 77 | }, 78 | "copyPageImageUrls": { 79 | "message": "Copy page image URLs ({0})", 80 | "description": "feature - Analyze full page to find image URLs, copy all as custom format text." 81 | }, 82 | "showPageImages": { 83 | "message": "Show page images", 84 | "description": "feature - Analyze full page to find image URLs, open all to new Tabs." 85 | }, 86 | "copySelectedAObjectsInfo": { 87 | "message": "Copy selected objects info ({0})", 88 | "description": "feature - Analyze selected context to find objects, copy all info as custom format text." 89 | }, 90 | "copyPageAObjectsInfo": { 91 | "message": "Copy page objects info ({0})", 92 | "description": "feature - Analyze full page to find objects, copy all info as custom format text." 93 | }, 94 | "copySelectedImgObjectsInfo": { 95 | "message": "Copy selected objects info ({0})", 96 | "description": "feature - Analyze selected context to find objects, copy all info as custom format text." 97 | }, 98 | "copyPageImgObjectsInfo": { 99 | "message": "Copy page objects info ({0})", 100 | "description": "feature - Analyze full page to find objects, copy all as custom format text." 101 | }, 102 | "tabsLimitAlert": { 103 | "message": "Too many URLs,only open the top {0} tabs.", 104 | "description": "message - Max tabs limit at once open." 105 | }, 106 | "saveOk": { 107 | "message": "Data saved.", 108 | "description": "messsage - Data saved." 109 | }, 110 | "actUrlFormatEmpty":{ 111 | "message": "Custom Urls format not be empty.", 112 | "description": "messsage - Custom Urls format not be empty." 113 | }, 114 | "actImgUrlFormatEmpty":{ 115 | "message": "Custom image Urls format not be empty.", 116 | "description": "messsage - Custom image Urls format not be empty." 117 | }, 118 | "resetSettings": { 119 | "message": "Default", 120 | "description": "UI button - reset to default settings." 121 | }, 122 | "saveSettings": { 123 | "message": "Save settings", 124 | "description": "UI button - Save settings." 125 | }, 126 | "puretextFormatDelAroundSpace": { 127 | "message": "Delete context around space.(trim)", 128 | "description": "UI setting - [Copy as pure text - format] - Delete context around space.(trim)" 129 | }, 130 | "puretextFormatDelInvisibleSpace": { 131 | "message": "Delete invisible space.", 132 | "description": "UI setting - [Copy as pure text - format] - Delete invisible space." 133 | }, 134 | "puretextFormatConvertQuotation": { 135 | "message": "Convert all type quotation to normal quotation.", 136 | "description": "UI setting - [Copy as pure text - format] - Convert all type quotation to normal quotation." 137 | }, 138 | "puretextFormatConvertApostrophe": { 139 | "message": "Convert all type apostrophe to normal apostrophe.", 140 | "description": "UI setting - [Copy as pure text - format] - Convert all type apostrophe to normal apostrophe." 141 | }, 142 | "puretextFormatConvertDash": { 143 | "message": "Convert all type dash to normal dash.", 144 | "description": "UI setting - [Copy as pure text - format] - Convert all type dash to normal dash." 145 | }, 146 | "puretextFormatConvertSpace": { 147 | "message": "Convert fullwidth space to normal space.", 148 | "description": "UI setting - [Copy as pure text - format - Convert fullwidth space to normal space." 149 | }, 150 | "puretextFormatMergeNewline": { 151 | "message": "Merge newline.", 152 | "description": "UI setting - [Copy as pure text - format] - Merge newline." 153 | }, 154 | "puretextFormatMergeSpace": { 155 | "message": "Merge space.", 156 | "description": "UI setting - [Copy as pure text - format] - Merge space." 157 | }, 158 | "puretextFormatMergeFullwidthSpace": { 159 | "message": "Merge fullwidth space.", 160 | "description": "UI setting - [Copy as pure text - format] - Merge fullwidth space." 161 | }, 162 | "puretextFormatMergeTabulation": { 163 | "message": "Merge tabulation.", 164 | "description": "UI setting - [Copy as pure text - format] - Merge tabulation." 165 | }, 166 | "puretextFormatMergeAllTypeSpace": { 167 | "message": "Merge all type space to one space.", 168 | "description": "UI setting - [Copy as pure text - format] - Merge all type space to one space." 169 | }, 170 | "htmltextFormatWithoutTag": { 171 | "message": "Copy without HTML Tag.", 172 | "description": "UI setting - [Copy as pure text - format] - Copy without HTML Tag." 173 | }, 174 | "linkCustomFormat": { 175 | "message": "Link custom format: ", 176 | "description": "UI setting - [Copy Link info - Format] - Link custom format for copy feature." 177 | }, 178 | "tabCustomFormat": { 179 | "message": "Tab custom format: ", 180 | "description": "UI setting - [Copy Tab info - Format] - Tab custom format for copy feature." 181 | }, 182 | "tabsinfoCustomFormat": { 183 | "message": "Copy all Tabs info custom format: ", 184 | "description": "UI setting - [Copy Tab info - Format] - Copy all Tabs info custom format." 185 | }, 186 | "fixUrlQuotEnd": { 187 | "message": "fix URLs end with quotation.", 188 | "description": "UI setting - [Analyze URLs] - fix URLs end with quotation." 189 | }, 190 | "urlsCustomFormat": { 191 | "message": "Copy URLs custom format: ", 192 | "description": "UI setting - [Analyze URLs] - Copy URLs custom format." 193 | }, 194 | "aObjectsCustomFormat": { 195 | "message": "Copy objects custom format: ", 196 | "description": "UI setting - [Analyze URLs] - Copy objects custom format." 197 | }, 198 | "imgObjectsCustomFormat": { 199 | "message": "Copy objects custom format: ", 200 | "description": "UI setting - [Analyze URLs] - Copy objects custom format." 201 | }, 202 | "imageUrlsCustomFormat": { 203 | "message": "Copy Image URLs custom format: ", 204 | "description": "UI setting - [Analyze URLs] - Copy Image URLs custom format." 205 | }, 206 | "maxTabsLimit": { 207 | "message": "Max tabs limit at once open: ", 208 | "description": "UI setting - [Analyze URLs] - Max tabs limit at once open." 209 | }, 210 | "openOneImageDirectly": { 211 | "message": "Open a single Image link directly", 212 | "description": "UI setting - [Analyze URLs] - Open a single Image link directly." 213 | }, 214 | "blobUrlToLocal": { 215 | "message": "Blob URLs convert to local images (very slow)", 216 | "description": "UI setting - [Analyze URLs] - Blob URLs convert to local images." 217 | }, 218 | "toolbarButtonAction": { 219 | "message": "Toolbar button action: ", 220 | "description": "UI setting - [Toolbar button] - Toolbar button action." 221 | }, 222 | "keyboardShortcutAction": { 223 | "message": "keyboard shortcut action: ", 224 | "description": "UI setting - [keybord shortcut] - keyboard shortcut action." 225 | }, 226 | "language":{ 227 | "message": "Language: ", 228 | "description": "UI setting - [Interface] - Language " 229 | }, 230 | "improveTrans":{ 231 | "message": "Improve translation", 232 | "description": "UI setting - [Interface] - Improve translation " 233 | } 234 | } -------------------------------------------------------------------------------- /TextLinkyTool/_locales/en_GB/messages.json: -------------------------------------------------------------------------------- 1 | { 2 | "copySelectedPuretext": { 3 | "message": "Copy context as pure text", 4 | "description": "feature - Copy text without HTML format of selected context." 5 | }, 6 | "copySelectedHtmltext": { 7 | "message": "Copy context as HTML text", 8 | "description": "feature - Copy HTML source text of selected context." 9 | }, 10 | "copyPagePuretext": { 11 | "message": "Copy page as pure text", 12 | "description": "feature - Copy text without HTML format of full page." 13 | }, 14 | "copyPageHtmltext": { 15 | "message": "Copy page as HTML text", 16 | "description": "feature - Copy HTML source text of full page." 17 | }, 18 | "copyLinkName": { 19 | "message": "Copy Link name", 20 | "description": "feature - Copy name of this Link." 21 | }, 22 | "copyLinkUrl": { 23 | "message": "Copy Link URL", 24 | "description": "feature - Copy URL of this Link." 25 | }, 26 | "copyLinkFormatText": { 27 | "message": "Copy Link as {0}", 28 | "description": "feature - Copy name & URL as custom format text of this Link." 29 | }, 30 | "copyImageUrl": { 31 | "message": "Copy Image URL", 32 | "description": "feature - Copy URL of this Image." 33 | }, 34 | "showImage": { 35 | "message": "Show Image", 36 | "description": "feature - Open Image on new Tab." 37 | }, 38 | "copyTabName": { 39 | "message": "Copy Tab name", 40 | "description": "feature - Copy name of this Tab." 41 | }, 42 | "copyTabUrl": { 43 | "message": "Copy Tab URL", 44 | "description": "feature - Copy URL of this Tab." 45 | }, 46 | "copyTabFormatText": { 47 | "message": "Copy Tab as {0}", 48 | "description": "feature - Copy name & URL as custom format text of this Tab." 49 | }, 50 | "copyAllTabsInfo": { 51 | "message": "Copy all Tabs info ({0})", 52 | "description": "feature - Copy all Tabs info." 53 | }, 54 | "copySelectedUrls": { 55 | "message": "Copy selected URLs ({0})", 56 | "description": "feature - Analyze selected context to find URLs, copy all as custom format text." 57 | }, 58 | "openSelectedUrls": { 59 | "message": "Open selected URLs", 60 | "description": "feature - Analyze selected context to find URLs, open all to new Tabs." 61 | }, 62 | "copyPageUrls": { 63 | "message": "Copy page URLs ({0})", 64 | "description": "feature - Analyze full page to find URLs, copy all as custom format text." 65 | }, 66 | "openPageUrls": { 67 | "message": "Open page URLs", 68 | "description": "feature - Analyze full page to find URLs, open all to new Tabs." 69 | }, 70 | "copySelectedImageUrls": { 71 | "message": "Copy selected image URLs ({0})", 72 | "description": "feature - Analyze selected context to find image URLs, copy all as custom format text." 73 | }, 74 | "showSelectedImages": { 75 | "message": "Show selected images", 76 | "description": "feature - Analyze selected context to find image URLs, open all to new Tabs." 77 | }, 78 | "copyPageImageUrls": { 79 | "message": "Copy page image URLs ({0})", 80 | "description": "feature - Analyze full page to find image URLs, copy all as custom format text." 81 | }, 82 | "showPageImages": { 83 | "message": "Show page images", 84 | "description": "feature - Analyze full page to find image URLs, open all to new Tabs." 85 | }, 86 | "copySelectedAObjectsInfo": { 87 | "message": "Copy selected objects info ({0})", 88 | "description": "feature - Analyze selected context to find objects, copy all info as custom format text." 89 | }, 90 | "copyPageAObjectsInfo": { 91 | "message": "Copy page objects info ({0})", 92 | "description": "feature - Analyze full page to find objects, copy all info as custom format text." 93 | }, 94 | "copySelectedImgObjectsInfo": { 95 | "message": "Copy selected objects info ({0})", 96 | "description": "feature - Analyze selected context to find objects, copy all info as custom format text." 97 | }, 98 | "copyPageImgObjectsInfo": { 99 | "message": "Copy page objects info ({0})", 100 | "description": "feature - Analyze full page to find objects, copy all as custom format text." 101 | }, 102 | "tabsLimitAlert": { 103 | "message": "Too many URLs,only open the top {0} tabs.", 104 | "description": "message - Max tabs limit at once open." 105 | }, 106 | "saveOk": { 107 | "message": "Data saved.", 108 | "description": "messsage - Data saved." 109 | }, 110 | "actUrlFormatEmpty":{ 111 | "message": "Custom Urls format not be empty.", 112 | "description": "messsage - Custom Urls format not be empty." 113 | }, 114 | "actImgUrlFormatEmpty":{ 115 | "message": "Custom image Urls format not be empty.", 116 | "description": "messsage - Custom image Urls format not be empty." 117 | }, 118 | "resetSettings": { 119 | "message": "Default", 120 | "description": "UI button - reset to default settings." 121 | }, 122 | "saveSettings": { 123 | "message": "Save settings", 124 | "description": "UI button - Save settings." 125 | }, 126 | "puretextFormatDelAroundSpace": { 127 | "message": "Delete context around space.(trim)", 128 | "description": "UI setting - [Copy as pure text - format] - Delete context around space.(trim)" 129 | }, 130 | "puretextFormatDelInvisibleSpace": { 131 | "message": "Delete invisible space.", 132 | "description": "UI setting - [Copy as pure text - format] - Delete invisible space." 133 | }, 134 | "puretextFormatConvertQuotation": { 135 | "message": "Convert all type quotation to normal quotation.", 136 | "description": "UI setting - [Copy as pure text - format] - Convert all type quotation to normal quotation." 137 | }, 138 | "puretextFormatConvertApostrophe": { 139 | "message": "Convert all type apostrophe to normal apostrophe.", 140 | "description": "UI setting - [Copy as pure text - format] - Convert all type apostrophe to normal apostrophe." 141 | }, 142 | "puretextFormatConvertDash": { 143 | "message": "Convert all type dash to normal dash.", 144 | "description": "UI setting - [Copy as pure text - format] - Convert all type dash to normal dash." 145 | }, 146 | "puretextFormatConvertSpace": { 147 | "message": "Convert fullwidth space to normal space.", 148 | "description": "UI setting - [Copy as pure text - format - Convert fullwidth space to normal space." 149 | }, 150 | "puretextFormatMergeNewline": { 151 | "message": "Merge newline.", 152 | "description": "UI setting - [Copy as pure text - format] - Merge newline." 153 | }, 154 | "puretextFormatMergeSpace": { 155 | "message": "Merge space.", 156 | "description": "UI setting - [Copy as pure text - format] - Merge space." 157 | }, 158 | "puretextFormatMergeFullwidthSpace": { 159 | "message": "Merge fullwidth space.", 160 | "description": "UI setting - [Copy as pure text - format] - Merge fullwidth space." 161 | }, 162 | "puretextFormatMergeTabulation": { 163 | "message": "Merge tabulation.", 164 | "description": "UI setting - [Copy as pure text - format] - Merge tabulation." 165 | }, 166 | "puretextFormatMergeAllTypeSpace": { 167 | "message": "Merge all type space to one space.", 168 | "description": "UI setting - [Copy as pure text - format] - Merge all type space to one space." 169 | }, 170 | "htmltextFormatWithoutTag": { 171 | "message": "Copy without HTML Tag.", 172 | "description": "UI setting - [Copy as pure text - format] - Copy without HTML Tag." 173 | }, 174 | "linkCustomFormat": { 175 | "message": "Link custom format: ", 176 | "description": "UI setting - [Copy Link info - Format] - Link custom format for copy feature." 177 | }, 178 | "tabCustomFormat": { 179 | "message": "Tab custom format: ", 180 | "description": "UI setting - [Copy Tab info - Format] - Tab custom format for copy feature." 181 | }, 182 | "tabsinfoCustomFormat": { 183 | "message": "Copy all Tabs info custom format: ", 184 | "description": "UI setting - [Copy Tab info - Format] - Copy all Tabs info custom format." 185 | }, 186 | "fixUrlQuotEnd": { 187 | "message": "fix URLs end with quotation.", 188 | "description": "UI setting - [Analyze URLs] - fix URLs end with quotation." 189 | }, 190 | "urlsCustomFormat": { 191 | "message": "Copy URLs custom format: ", 192 | "description": "UI setting - [Analyze URLs] - Copy URLs custom format." 193 | }, 194 | "aObjectsCustomFormat": { 195 | "message": "Copy objects custom format: ", 196 | "description": "UI setting - [Analyze URLs] - Copy objects custom format." 197 | }, 198 | "imgObjectsCustomFormat": { 199 | "message": "Copy objects custom format: ", 200 | "description": "UI setting - [Analyze URLs] - Copy objects custom format." 201 | }, 202 | "imageUrlsCustomFormat": { 203 | "message": "Copy Image URLs custom format: ", 204 | "description": "UI setting - [Analyze URLs] - Copy Image URLs custom format." 205 | }, 206 | "maxTabsLimit": { 207 | "message": "Max tabs limit at once open: ", 208 | "description": "UI setting - [Analyze URLs] - Max tabs limit at once open." 209 | }, 210 | "openOneImageDirectly": { 211 | "message": "Open a single Image link directly", 212 | "description": "UI setting - [Analyze URLs] - Open a single Image link directly." 213 | }, 214 | "blobUrlToLocal": { 215 | "message": "Blob URLs convert to local images (very slow)", 216 | "description": "UI setting - [Analyze URLs] - Blob URLs convert to local images." 217 | }, 218 | "toolbarButtonAction": { 219 | "message": "Toolbar button action: ", 220 | "description": "UI setting - [Toolbar button] - Toolbar button action." 221 | }, 222 | "keyboardShortcutAction": { 223 | "message": "keyboard shortcut action: ", 224 | "description": "UI setting - [keybord shortcut] - keyboard shortcut action." 225 | }, 226 | "language":{ 227 | "message": "Language: ", 228 | "description": "UI setting - [Interface] - Language " 229 | }, 230 | "improveTrans":{ 231 | "message": "Improve translation", 232 | "description": "UI setting - [Interface] - Improve translation " 233 | } 234 | } -------------------------------------------------------------------------------- /TextLinkyTool/_locales/ja/messages.json: -------------------------------------------------------------------------------- 1 | { 2 | "copySelectedPuretext": { 3 | "message": "選択範囲の文字列をHTMLコードを含めずにコピーする", 4 | "description": "feature - Copy text without HTML format of selected context." 5 | }, 6 | "copySelectedHtmltext": { 7 | "message": "選択範囲の文字列をHTMLコードごとコピーする", 8 | "description": "feature - Copy HTML source text of selected context." 9 | }, 10 | "copyPagePuretext": { 11 | "message": "閲覧ページの全ての文字列をHTMLコードを含めずにコピーする", 12 | "description": "feature - Copy text without HTML format of full page." 13 | }, 14 | "copyPageHtmltext": { 15 | "message": "閲覧ページの全ての文字列HTMLコードごとコピーする", 16 | "description": "feature - Copy HTML source text of full page." 17 | }, 18 | "copyLinkName": { 19 | "message": "リンクテキストをコピーする", 20 | "description": "feature - Copy name of this Link." 21 | }, 22 | "copyLinkUrl": { 23 | "message": "リンク先URLをコピーする", 24 | "description": "feature - Copy URL of this Link." 25 | }, 26 | "copyLinkFormatText": { 27 | "message": "リンク情報を{0}にコピーする", 28 | "description": "feature - Copy name & URL as custom format text of this Link." 29 | }, 30 | "copyImageUrl": { 31 | "message": "画像リンクをコピーする", 32 | "description": "feature - Copy URL of this Image." 33 | }, 34 | "showImage": { 35 | "message": "画像リンクを開く", 36 | "description": "feature - Open Image on new Tab." 37 | }, 38 | "copyTabName": { 39 | "message": "タブ名をコピーする", 40 | "description": "feature - Copy name of this Tab." 41 | }, 42 | "copyTabUrl": { 43 | "message": "タブリンクをコピーする", 44 | "description": "feature - Copy URL of this Tab." 45 | }, 46 | "copyTabFormatText": { 47 | "message": "タブ情報を{0}にコピーする", 48 | "description": "feature - Copy name & URL as custom format text of this Tab." 49 | }, 50 | "copyAllTabsInfo": { 51 | "message": "すべてのタブ情報をカスタムテキストにコピーする ({0})", 52 | "description": "feature - Copy all Tabs info." 53 | }, 54 | "copySelectedUrls": { 55 | "message": "選択範囲に含まれる全てのリンクをコピーする ({0})", 56 | "description": "feature - Analyze selected context to find URLs, copy all as custom format text." 57 | }, 58 | "openSelectedUrls": { 59 | "message": "選択範囲に含まれる全てのリンクを開く", 60 | "description": "feature - Analyze selected context to find URLs, open all to new Tabs." 61 | }, 62 | "copyPageUrls": { 63 | "message": "閲覧ページに含まれる全てのリンクをコピーする ({0})", 64 | "description": "feature - Analyze full page to find URLs, copy all as custom format text." 65 | }, 66 | "openPageUrls": { 67 | "message": "閲覧ページに含まれる全てのリンクを開く", 68 | "description": "feature - Analyze full page to find URLs, open all to new Tabs." 69 | }, 70 | "copySelectedImageUrls": { 71 | "message": "選択範囲に含まれる全ての画像リンクをコピーする ({0})", 72 | "description": "feature - Analyze selected context to find image URLs, copy all as custom format text." 73 | }, 74 | "showSelectedImages": { 75 | "message": "選択範囲に含まれる全ての画像リンクを開く", 76 | "description": "feature - Analyze selected context to find image URLs, open all to new Tabs." 77 | }, 78 | "copyPageImageUrls": { 79 | "message": "閲覧ページに含まれる全ての画像リンクをコピーする ({0})", 80 | "description": "feature - Analyze full page to find image URLs, copy all as custom format text." 81 | }, 82 | "showPageImages": { 83 | "message": "閲覧ページに含まれる全ての画像リンクを開く", 84 | "description": "feature - Analyze full page to find image URLs, open all to new Tabs." 85 | }, 86 | "copySelectedAObjectsInfo": { 87 | "message": "Copy selected objects info ({0})", 88 | "description": "feature - Analyze selected context to find objects, copy all info as custom format text." 89 | }, 90 | "copyPageAObjectsInfo": { 91 | "message": "Copy page objects info ({0})", 92 | "description": "feature - Analyze full page to find objects, copy all info as custom format text." 93 | }, 94 | "copySelectedImgObjectsInfo": { 95 | "message": "Copy selected objects info ({0})", 96 | "description": "feature - Analyze selected context to find objects, copy all info as custom format text." 97 | }, 98 | "copyPageImgObjectsInfo": { 99 | "message": "Copy page objects info ({0})", 100 | "description": "feature - Analyze full page to find objects, copy all as custom format text." 101 | }, 102 | "tabsLimitAlert": { 103 | "message": "同時起動の最大制限数 {0} タブを超えました。", 104 | "description": "message - Max tabs limit at once open." 105 | }, 106 | "saveOk": { 107 | "message": "データが保存されました。", 108 | "description": "messsage - Data saved." 109 | }, 110 | "actUrlFormatEmpty":{ 111 | "message": "Custom Urls format not be empty.", 112 | "description": "messsage - Custom Urls format not be empty." 113 | }, 114 | "actImgUrlFormatEmpty":{ 115 | "message": "Custom image Urls format not be empty.", 116 | "description": "messsage - Custom image Urls format not be empty." 117 | }, 118 | "resetSettings": { 119 | "message": "デフォルト", 120 | "description": "UI button - reset to default settings." 121 | }, 122 | "saveSettings": { 123 | "message": "セーブ", 124 | "description": "UI button - Save settings." 125 | }, 126 | "puretextFormatDelAroundSpace": { 127 | "message": "前後のスペースを削除する(トリム)", 128 | "description": "UI setting - [Copy as pure text - format] - Delete context around space.(trim)" 129 | }, 130 | "puretextFormatDelInvisibleSpace": { 131 | "message": "見えないスペースを削除する", 132 | "description": "UI setting - [Copy as pure text - format] - Delete invisible space." 133 | }, 134 | "puretextFormatConvertQuotation": { 135 | "message": "全角ダブルクォートを半角ダブルクォートに変換する", 136 | "description": "UI setting - [Copy as pure text - format] - Convert all type quotation to normal quotation." 137 | }, 138 | "puretextFormatConvertApostrophe": { 139 | "message": "全角シングルクォートを半角シングルクォートに変換する", 140 | "description": "UI setting - [Copy as pure text - format] - Convert all type apostrophe to normal apostrophe." 141 | }, 142 | "puretextFormatConvertDash": { 143 | "message": "全角ダッシュを半角ダッシュに変換する", 144 | "description": "UI setting - [Copy as pure text - format] - Convert all type dash to normal dash." 145 | }, 146 | "puretextFormatConvertSpace": { 147 | "message": "全角スペースを半角スペースに変換する", 148 | "description": "UI setting - [Copy as pure text - format - Convert fullwidth space to normal space." 149 | }, 150 | "puretextFormatMergeNewline": { 151 | "message": "連続した改行を1つにまとめる", 152 | "description": "UI setting - [Copy as pure text - format] - Merge newline." 153 | }, 154 | "puretextFormatMergeSpace": { 155 | "message": "連続した半角スペースを1つにまとめる", 156 | "description": "UI setting - [Copy as pure text - format] - Merge space." 157 | }, 158 | "puretextFormatMergeFullwidthSpace": { 159 | "message": "連続した全角スペースを1つにまとめる", 160 | "description": "UI setting - [Copy as pure text - format] - Merge fullwidth space." 161 | }, 162 | "puretextFormatMergeTabulation": { 163 | "message": "連続したタブ(tab)を1つにまとめる", 164 | "description": "UI setting - [Copy as pure text - format] - Merge tabulation." 165 | }, 166 | "puretextFormatMergeAllTypeSpace": { 167 | "message": "連続したすべての種類のスペースを1つの半角スペースをにまとめる", 168 | "description": "UI setting - [Copy as pure text - format] - Merge all type space to one space." 169 | }, 170 | "htmltextFormatWithoutTag": { 171 | "message": "Copy without HTML Tag.", 172 | "description": "UI setting - [Copy as pure text - format] - Copy without HTML Tag." 173 | }, 174 | "linkCustomFormat": { 175 | "message": "Link custom format: ", 176 | "description": "UI setting - [Copy Link info - Format] - Link custom format for copy feature." 177 | }, 178 | "tabCustomFormat": { 179 | "message": "Tab custom format: ", 180 | "description": "UI setting - [Copy Tab info - Format] - Tab custom format for copy feature." 181 | }, 182 | "tabsinfoCustomFormat": { 183 | "message": "Copy all Tabs info custom format: ", 184 | "description": "UI setting - [Copy Tab info - Format] - Copy all Tabs info custom format." 185 | }, 186 | "fixUrlQuotEnd": { 187 | "message": "fix URLs end with quotation.", 188 | "description": "UI setting - [Analyze URLs] - fix URLs end with quotation." 189 | }, 190 | "urlsCustomFormat": { 191 | "message": "Copy URLs custom format: ", 192 | "description": "UI setting - [Analyze URLs] - Copy URLs custom format." 193 | }, 194 | "aObjectsCustomFormat": { 195 | "message": "Copy objects custom format: ", 196 | "description": "UI setting - [Analyze URLs] - Copy objects custom format." 197 | }, 198 | "imgObjectsCustomFormat": { 199 | "message": "Copy objects custom format: ", 200 | "description": "UI setting - [Analyze URLs] - Copy objects custom format." 201 | }, 202 | "imageUrlsCustomFormat": { 203 | "message": "Copy Image URLs custom format: ", 204 | "description": "UI setting - [Analyze URLs] - Copy Image URLs custom format." 205 | }, 206 | "maxTabsLimit": { 207 | "message": "Max tabs limit at once open: ", 208 | "description": "UI setting - [Analyze URLs] - Max tabs limit at once open." 209 | }, 210 | "openOneImageDirectly": { 211 | "message": "Open a single Image link directly", 212 | "description": "UI setting - [Analyze URLs] - Open a single Image link directly." 213 | }, 214 | "blobUrlToLocal": { 215 | "message": "Blob URLs convert to local images (very slow)", 216 | "description": "UI setting - [Analyze URLs] - Blob URLs convert to local images." 217 | }, 218 | "toolbarButtonAction": { 219 | "message": "ツールバーのボタンを操作: ", 220 | "description": "UI setting - [Toolbar button] - Toolbar button action." 221 | }, 222 | "keyboardShortcutAction": { 223 | "message": "ショートカットを操作: ", 224 | "description": "UI setting - [keybord shortcut] - keyboard shortcut action." 225 | }, 226 | "language":{ 227 | "message": "言語: ", 228 | "description": "UI setting - [Interface] - Language " 229 | }, 230 | "improveTrans":{ 231 | "message": "翻訳を改善する", 232 | "description": "UI setting - [Interface] - Improve translation " 233 | } 234 | } -------------------------------------------------------------------------------- /TextLinkyTool/_locales/ru/messages.json: -------------------------------------------------------------------------------- 1 | { 2 | "copySelectedPuretext": { 3 | "message": "Копировать выделенное как чистый текст", 4 | "description": "feature - Copy text without HTML format of selected context." 5 | }, 6 | "copySelectedHtmltext": { 7 | "message": "Копировать выделенное как HTML-текст", 8 | "description": "feature - Copy HTML source text of selected context." 9 | }, 10 | "copyPagePuretext": { 11 | "message": "Копировать страницу как чистый текст", 12 | "description": "feature - Copy text without HTML format of full page." 13 | }, 14 | "copyPageHtmltext": { 15 | "message": "Копировать страницу как HTML-текст", 16 | "description": "feature - Copy HTML source text of full page." 17 | }, 18 | "copyLinkName": { 19 | "message": "Копировать название ссылки", 20 | "description": "feature - Copy name of this Link." 21 | }, 22 | "copyLinkUrl": { 23 | "message": "Копировать URL-адрес ссылки", 24 | "description": "feature - Copy URL of this Link." 25 | }, 26 | "copyLinkFormatText": { 27 | "message": "Копировать ссылку как {0}", 28 | "description": "feature - Copy name & URL as custom format text of this Link." 29 | }, 30 | "copyImageUrl": { 31 | "message": "Копировать URL-адрес изображения", 32 | "description": "feature - Copy URL of this Image." 33 | }, 34 | "showImage": { 35 | "message": "Показать изображение", 36 | "description": "feature - Open Image on new Tab." 37 | }, 38 | "copyTabName": { 39 | "message": "Копировать название вкладки", 40 | "description": "feature - Copy name of this Tab." 41 | }, 42 | "copyTabUrl": { 43 | "message": "Копировать URL-адрес вкладки", 44 | "description": "feature - Copy URL of this Tab." 45 | }, 46 | "copyTabFormatText": { 47 | "message": "Копировать вкладку как {0}", 48 | "description": "feature - Copy name & URL as custom format text of this Tab." 49 | }, 50 | "copyAllTabsInfo": { 51 | "message": "Копировать информацию о всех вкладках ({0})", 52 | "description": "feature - Copy all Tabs info." 53 | }, 54 | "copySelectedUrls": { 55 | "message": "Копировать выбранные URL-адреса ({0})", 56 | "description": "feature - Analyze selected context to find URLs, copy all as custom format text." 57 | }, 58 | "openSelectedUrls": { 59 | "message": "Открыть выбранные URL-адреса", 60 | "description": "feature - Analyze selected context to find URLs, open all to new Tabs." 61 | }, 62 | "copyPageUrls": { 63 | "message": "Копировать URL-адреса страницы ({0})", 64 | "description": "feature - Analyze full page to find URLs, copy all as custom format text." 65 | }, 66 | "openPageUrls": { 67 | "message": "Открыть URL-адреса страницы", 68 | "description": "feature - Analyze full page to find URLs, open all to new Tabs." 69 | }, 70 | "copySelectedImageUrls": { 71 | "message": "Копировать URL-адреса выбранных изображений ({0})", 72 | "description": "feature - Analyze selected context to find image URLs, copy all as custom format text." 73 | }, 74 | "showSelectedImages": { 75 | "message": "Показать выбранные изображения", 76 | "description": "feature - Analyze selected context to find image URLs, open all to new Tabs." 77 | }, 78 | "copyPageImageUrls": { 79 | "message": "Копировать URL-адреса изображений страницы ({0})", 80 | "description": "feature - Analyze full page to find image URLs, copy all as custom format text." 81 | }, 82 | "showPageImages": { 83 | "message": "Показать изображения страницы", 84 | "description": "feature - Analyze full page to find image URLs, open all to new Tabs." 85 | }, 86 | "copySelectedAObjectsInfo": { 87 | "message": "Копировать данные выбранных объектов ({0})", 88 | "description": "feature - Analyze selected context to find objects, copy all info as custom format text." 89 | }, 90 | "copyPageAObjectsInfo": { 91 | "message": "Копировать данные объектов всей страницы ({0})", 92 | "description": "feature - Analyze full page to find objects, copy all info as custom format text." 93 | }, 94 | "copySelectedImgObjectsInfo": { 95 | "message": "Копировать данные выбранных объектов ({0})", 96 | "description": "feature - Analyze selected context to find objects, copy all info as custom format text." 97 | }, 98 | "copyPageImgObjectsInfo": { 99 | "message": "Копировать данные объектов всей страницы ({0})", 100 | "description": "feature - Analyze full page to find objects, copy all as custom format text." 101 | }, 102 | "tabsLimitAlert": { 103 | "message": "Слишком много URL-адресов, открыты только первые {0} вкладок.", 104 | "description": "message - Max tabs limit at once open." 105 | }, 106 | "saveOk": { 107 | "message": "Данные сохранены.", 108 | "description": "messsage - Data saved." 109 | }, 110 | "actUrlFormatEmpty":{ 111 | "message": "Пользовательский формат URL-адресов не может быть пустым.", 112 | "description": "messsage - Custom Urls format not be empty." 113 | }, 114 | "actImgUrlFormatEmpty":{ 115 | "message": "Пользовательский формат URL-адресов изображений не может быть пустым.", 116 | "description": "messsage - Custom image Urls format not be empty." 117 | }, 118 | "resetSettings": { 119 | "message": "По умолчанию", 120 | "description": "UI button - reset to default settings." 121 | }, 122 | "saveSettings": { 123 | "message": "Сохранить настройки", 124 | "description": "UI button - Save settings." 125 | }, 126 | "puretextFormatDelAroundSpace": { 127 | "message": "Очищать вокруг пробелов (обрезка)", 128 | "description": "UI setting - [Copy as pure text - format] - Delete context around space.(trim)" 129 | }, 130 | "puretextFormatDelInvisibleSpace": { 131 | "message": "Удалять невидимые области", 132 | "description": "UI setting - [Copy as pure text - format] - Delete invisible space." 133 | }, 134 | "puretextFormatConvertQuotation": { 135 | "message": "Преобразовывать все типы кавычек в обычные", 136 | "description": "UI setting - [Copy as pure text - format] - Convert all type quotation to normal quotation." 137 | }, 138 | "puretextFormatConvertApostrophe": { 139 | "message": "Преобразовывать все типы апострофов в обычный", 140 | "description": "UI setting - [Copy as pure text - format] - Convert all type apostrophe to normal apostrophe." 141 | }, 142 | "puretextFormatConvertDash": { 143 | "message": "Преобразовывать все типы тире в обычное", 144 | "description": "UI setting - [Copy as pure text - format] - Convert all type dash to normal dash." 145 | }, 146 | "puretextFormatConvertSpace": { 147 | "message": "Преобразовывать широкий пробел в нормальный", 148 | "description": "UI setting - [Copy as pure text - format - Convert fullwidth space to normal space." 149 | }, 150 | "puretextFormatMergeNewline": { 151 | "message": "Объединять переводы строки", 152 | "description": "UI setting - [Copy as pure text - format] - Merge newline." 153 | }, 154 | "puretextFormatMergeSpace": { 155 | "message": "Объединять пробелы", 156 | "description": "UI setting - [Copy as pure text - format] - Merge space." 157 | }, 158 | "puretextFormatMergeFullwidthSpace": { 159 | "message": "Объединять широкие пробелы", 160 | "description": "UI setting - [Copy as pure text - format] - Merge fullwidth space." 161 | }, 162 | "puretextFormatMergeTabulation": { 163 | "message": "Объединять табуляцию", 164 | "description": "UI setting - [Copy as pure text - format] - Merge tabulation." 165 | }, 166 | "puretextFormatMergeAllTypeSpace": { 167 | "message": "Объединять все типы пробелов в один пробел", 168 | "description": "UI setting - [Copy as pure text - format] - Merge all type space to one space." 169 | }, 170 | "htmltextFormatWithoutTag": { 171 | "message": "Копировать без HTML-тега", 172 | "description": "UI setting - [Copy as pure text - format] - Copy without HTML Tag." 173 | }, 174 | "linkCustomFormat": { 175 | "message": "Пользовательский формат ссылки: ", 176 | "description": "UI setting - [Copy Link info - Format] - Link custom format for copy feature." 177 | }, 178 | "tabCustomFormat": { 179 | "message": "Пользовательский формат вкладки: ", 180 | "description": "UI setting - [Copy Tab info - Format] - Tab custom format for copy feature." 181 | }, 182 | "tabsinfoCustomFormat": { 183 | "message": "Пользовательский формат информации о всех вкладках: ", 184 | "description": "UI setting - [Copy Tab info - Format] - Copy all Tabs info custom format." 185 | }, 186 | "fixUrlQuotEnd": { 187 | "message": "Исправлять URL-адреса, заканчивающиеся кавычками", 188 | "description": "UI setting - [Analyze URLs] - fix URLs end with quotation." 189 | }, 190 | "urlsCustomFormat": { 191 | "message": "Пользовательский формат копируемых URL-адресов: ", 192 | "description": "UI setting - [Analyze URLs] - Copy URLs custom format." 193 | }, 194 | "aObjectsCustomFormat": { 195 | "message": "Пользовательский формат копируемых объектов : ", 196 | "description": "UI setting - [Analyze URLs] - Copy objects custom format." 197 | }, 198 | "imgObjectsCustomFormat": { 199 | "message": "Пользовательский формат копируемых объектов : ", 200 | "description": "UI setting - [Analyze URLs] - Copy objects custom format." 201 | }, 202 | "imageUrlsCustomFormat": { 203 | "message": "Пользовательский формат копируемых URL-адресов изображений: ", 204 | "description": "UI setting - [Analyze URLs] - Copy Image URLs custom format." 205 | }, 206 | "maxTabsLimit": { 207 | "message": "Максимальное число одновременно открываемых вкладок: ", 208 | "description": "UI setting - [Analyze URLs] - Max tabs limit at once open." 209 | }, 210 | "openOneImageDirectly": { 211 | "message": "Открывать ссылку на единственное изображение напрямую", 212 | "description": "UI setting - [Analyze URLs] - Open a single Image link directly." 213 | }, 214 | "blobUrlToLocal": { 215 | "message": "Преобразовывать Blob URL в локальные URL-адреса (очень медленно)", 216 | "description": "UI setting - [Analyze URLs] - Blob URLs convert to local images." 217 | }, 218 | "toolbarButtonAction": { 219 | "message": "Действие кнопки панели инструментов: ", 220 | "description": "UI setting - [Toolbar button] - Toolbar button action." 221 | }, 222 | "keyboardShortcutAction": { 223 | "message": "Действие сочетания клавиш: ", 224 | "description": "UI setting - [keybord shortcut] - keyboard shortcut action." 225 | }, 226 | "language":{ 227 | "message": "Язык: ", 228 | "description": "UI setting - [Interface] - Language " 229 | }, 230 | "improveTrans":{ 231 | "message": "Улучшить перевод", 232 | "description": "UI setting - [Interface] - Improve translation " 233 | } 234 | } 235 | -------------------------------------------------------------------------------- /TextLinkyTool/_locales/zh_CN/messages.json: -------------------------------------------------------------------------------- 1 | { 2 | "copySelectedPuretext": { 3 | "message": "复制选定纯文本", 4 | "description": "feature - Copy text without HTML format of selected context." 5 | }, 6 | "copySelectedHtmltext": { 7 | "message": "复制选定 HTML 文本", 8 | "description": "feature - Copy HTML source text of selected context." 9 | }, 10 | "copyPagePuretext": { 11 | "message": "复制页面纯文本", 12 | "description": "feature - Copy text without HTML format of full page." 13 | }, 14 | "copyPageHtmltext": { 15 | "message": "复制页面 HTML 文本", 16 | "description": "feature - Copy HTML source text of full page." 17 | }, 18 | "copyLinkName": { 19 | "message": "复制链接的名称", 20 | "description": "feature - Copy name of this Link." 21 | }, 22 | "copyLinkUrl": { 23 | "message": "复制链接的网址", 24 | "description": "feature - Copy URL of this Link." 25 | }, 26 | "copyLinkFormatText": { 27 | "message": "复制链接为 {0}", 28 | "description": "feature - Copy name & URL as custom format text of this Link." 29 | }, 30 | "copyImageUrl": { 31 | "message": "复制图片网址", 32 | "description": "feature - Copy URL of this Image." 33 | }, 34 | "showImage": { 35 | "message": "显示图片", 36 | "description": "feature - Open Image on new Tab." 37 | }, 38 | "copyTabName": { 39 | "message": "复制标签页名称", 40 | "description": "feature - Copy name of this Tab." 41 | }, 42 | "copyTabUrl": { 43 | "message": "复制标签页网址", 44 | "description": "feature - Copy URL of this Tab." 45 | }, 46 | "copyTabFormatText": { 47 | "message": "复制标签页为 {0}", 48 | "description": "feature - Copy name & URL as custom format text of this Tab." 49 | }, 50 | "copyAllTabsInfo": { 51 | "message": "复制所有标签页信息 ({0})", 52 | "description": "feature - Copy all Tabs info." 53 | }, 54 | "copySelectedUrls": { 55 | "message": "复制选定网址 ({0})", 56 | "description": "feature - Analyze selected context to find URLs, copy all as custom format text." 57 | }, 58 | "openSelectedUrls": { 59 | "message": "打开选定网址", 60 | "description": "feature - Analyze selected context to find URLs, open all to new Tabs." 61 | }, 62 | "copyPageUrls": { 63 | "message": "复制页面网址 ({0})", 64 | "description": "feature - Analyze full page to find URLs, copy all as custom format text." 65 | }, 66 | "openPageUrls": { 67 | "message": "打开页面网址", 68 | "description": "feature - Analyze full page to find URLs, open all to new Tabs." 69 | }, 70 | "copySelectedImageUrls": { 71 | "message": "复制选定图片网址 ({0})", 72 | "description": "feature - Analyze selected context to find image URLs, copy all as custom format text." 73 | }, 74 | "showSelectedImages": { 75 | "message": "显示选定图片", 76 | "description": "feature - Analyze selected context to find image URLs, open all to new Tabs." 77 | }, 78 | "copyPageImageUrls": { 79 | "message": "复制页面图片网址 ({0})", 80 | "description": "feature - Analyze full page to find image URLs, copy all as custom format text." 81 | }, 82 | "showPageImages": { 83 | "message": "显示页面图片", 84 | "description": "feature - Analyze full page to find image URLs, open all to new Tabs." 85 | }, 86 | "copySelectedAObjectsInfo": { 87 | "message": "复制选定的 对象信息 ({0})", 88 | "description": "feature - Analyze selected context to find objects, copy all info as custom format text." 89 | }, 90 | "copyPageAObjectsInfo": { 91 | "message": "复制页面 对象信息 ({0})", 92 | "description": "feature - Analyze full page to find objects, copy all info as custom format text." 93 | }, 94 | "copySelectedImgObjectsInfo": { 95 | "message": "复制选定的 对象信息 ({0})", 96 | "description": "feature - Analyze selected context to find objects, copy all info as custom format text." 97 | }, 98 | "copyPageImgObjectsInfo": { 99 | "message": "复制页面 对象信息 ({0})", 100 | "description": "feature - Analyze full page to find objects, copy all as custom format text." 101 | }, 102 | "tabsLimitAlert": { 103 | "message": "太多网址,仅打开前 {0} 个标签页。", 104 | "description": "message - Max tabs limit at once open." 105 | }, 106 | "saveOk": { 107 | "message": "数据已保存", 108 | "description": "messsage - Data saved." 109 | }, 110 | "actUrlFormatEmpty":{ 111 | "message": "自定义网址格式不能为空。", 112 | "description": "messsage - Custom Urls format not be empty." 113 | }, 114 | "actImgUrlFormatEmpty":{ 115 | "message": "自定义图片网址格式不能为空。", 116 | "description": "messsage - Custom image Urls format not be empty." 117 | }, 118 | "resetSettings": { 119 | "message": "默认", 120 | "description": "UI button - reset to default settings." 121 | }, 122 | "saveSettings": { 123 | "message": "保存设置", 124 | "description": "UI button - Save settings." 125 | }, 126 | "puretextFormatDelAroundSpace": { 127 | "message": "删除选定内容周围的空格。(修剪)", 128 | "description": "UI setting - [Copy as pure text - format] - Delete context around space.(trim)" 129 | }, 130 | "puretextFormatDelInvisibleSpace": { 131 | "message": "删除不可见空格", 132 | "description": "UI setting - [Copy as pure text - format] - Delete invisible space." 133 | }, 134 | "puretextFormatConvertQuotation": { 135 | "message": "转换所有类型的引文为普通引文。", 136 | "description": "UI setting - [Copy as pure text - format] - Convert all type quotation to normal quotation." 137 | }, 138 | "puretextFormatConvertApostrophe": { 139 | "message": "转换所有类型的撇号为普通撇号。", 140 | "description": "UI setting - [Copy as pure text - format] - Convert all type apostrophe to normal apostrophe." 141 | }, 142 | "puretextFormatConvertDash": { 143 | "message": "转换所有类型的短线为普通短线。", 144 | "description": "UI setting - [Copy as pure text - format] - Convert all type dash to normal dash." 145 | }, 146 | "puretextFormatConvertSpace": { 147 | "message": "转换全角空格为普通空格。", 148 | "description": "UI setting - [Copy as pure text - format - Convert fullwidth space to normal space." 149 | }, 150 | "puretextFormatMergeNewline": { 151 | "message": "合并换行字符。", 152 | "description": "UI setting - [Copy as pure text - format] - Merge newline." 153 | }, 154 | "puretextFormatMergeSpace": { 155 | "message": "合并空格字符。", 156 | "description": "UI setting - [Copy as pure text - format] - Merge space." 157 | }, 158 | "puretextFormatMergeFullwidthSpace": { 159 | "message": "合并全角空格。", 160 | "description": "UI setting - [Copy as pure text - format] - Merge fullwidth space." 161 | }, 162 | "puretextFormatMergeTabulation": { 163 | "message": "合并制表符。", 164 | "description": "UI setting - [Copy as pure text - format] - Merge tabulation." 165 | }, 166 | "puretextFormatMergeAllTypeSpace": { 167 | "message": "合并所有类型的空格为一个空格。", 168 | "description": "UI setting - [Copy as pure text - format] - Merge all type space to one space." 169 | }, 170 | "htmltextFormatWithoutTag": { 171 | "message": "不带 HTML 标记复制。", 172 | "description": "UI setting - [Copy as pure text - format] - Copy without HTML Tag." 173 | }, 174 | "linkCustomFormat": { 175 | "message": "链接自定义格式: ", 176 | "description": "UI setting - [Copy Link info - Format] - Link custom format for copy feature." 177 | }, 178 | "tabCustomFormat": { 179 | "message": "标签页自定义格式: ", 180 | "description": "UI setting - [Copy Tab info - Format] - Tab custom format for copy feature." 181 | }, 182 | "tabsinfoCustomFormat": { 183 | "message": "复制全部标签页信息自定义格式: ", 184 | "description": "UI setting - [Copy Tab info - Format] - Copy all Tabs info custom format." 185 | }, 186 | "fixUrlQuotEnd": { 187 | "message": "修复以引号结尾的网址。", 188 | "description": "UI setting - [Analyze URLs] - fix URLs end with quotation." 189 | }, 190 | "urlsCustomFormat": { 191 | "message": "复制网址自定义格式: ", 192 | "description": "UI setting - [Analyze URLs] - Copy URLs custom format." 193 | }, 194 | "aObjectsCustomFormat": { 195 | "message": "复制 对象自定义格式: ", 196 | "description": "UI setting - [Analyze URLs] - Copy objects custom format." 197 | }, 198 | "imgObjectsCustomFormat": { 199 | "message": "复制 对象自定义格式: ", 200 | "description": "UI setting - [Analyze URLs] - Copy objects custom format." 201 | }, 202 | "imageUrlsCustomFormat": { 203 | "message": "复制图像网址自定义格式: ", 204 | "description": "UI setting - [Analyze URLs] - Copy Image URLs custom format." 205 | }, 206 | "maxTabsLimit": { 207 | "message": "一次最多打开标签页: ", 208 | "description": "UI setting - [Analyze URLs] - Max tabs limit at once open." 209 | }, 210 | "openOneImageDirectly": { 211 | "message": "直接打开单图链接", 212 | "description": "UI setting - [Analyze URLs] - Open a single Image link directly." 213 | }, 214 | "blobUrlToLocal": { 215 | "message": "Blob 网址转换为本地图片(非常慢)", 216 | "description": "UI setting - [Analyze URLs] - Blob URLs convert to local images." 217 | }, 218 | "toolbarButtonAction": { 219 | "message": "工具栏按钮动作: ", 220 | "description": "UI setting - [Toolbar button] - Toolbar button action." 221 | }, 222 | "keyboardShortcutAction": { 223 | "message": "快捷键动作: ", 224 | "description": "UI setting - [keybord shortcut] - keyboard shortcut action." 225 | }, 226 | "language":{ 227 | "message": "语言: ", 228 | "description": "UI setting - [Interface] - Language " 229 | }, 230 | "improveTrans":{ 231 | "message": "改进译文", 232 | "description": "UI setting - [Interface] - Improve translation " 233 | } 234 | } 235 | -------------------------------------------------------------------------------- /TextLinkyTool/_locales/zh_TW/messages.json: -------------------------------------------------------------------------------- 1 | { 2 | "copySelectedPuretext": { 3 | "message": "複製選取範圍為純文字", 4 | "description": "feature - Copy text without HTML format of selected context." 5 | }, 6 | "copySelectedHtmltext": { 7 | "message": "複製選取範圍為 HTML 文字", 8 | "description": "feature - Copy HTML source text of selected context." 9 | }, 10 | "copyPagePuretext": { 11 | "message": "複製全頁面為純文字", 12 | "description": "feature - Copy text without HTML format of full page." 13 | }, 14 | "copyPageHtmltext": { 15 | "message": "複製全頁面為 HTML 文字", 16 | "description": "feature - Copy HTML source text of full page." 17 | }, 18 | "copyLinkName": { 19 | "message": "複製連結名稱", 20 | "description": "feature - Copy name of this Link." 21 | }, 22 | "copyLinkUrl": { 23 | "message": "複製連結網址", 24 | "description": "feature - Copy URL of this Link." 25 | }, 26 | "copyLinkFormatText": { 27 | "message": "複製連結為{0}", 28 | "description": "feature - Copy name & URL as custom format text of this Link." 29 | }, 30 | "copyImageUrl": { 31 | "message": "複製圖片網址", 32 | "description": "feature - Copy URL of this Image." 33 | }, 34 | "showImage": { 35 | "message": "開啟圖片網址", 36 | "description": "feature - Open Image on new Tab." 37 | }, 38 | "copyTabName": { 39 | "message": "複製頁籤名稱", 40 | "description": "feature - Copy name of this Tab." 41 | }, 42 | "copyTabUrl": { 43 | "message": "複製頁籤網址", 44 | "description": "feature - Copy URL of this Tab." 45 | }, 46 | "copyTabFormatText": { 47 | "message": "複製頁籤為{0}", 48 | "description": "feature - Copy name & URL as custom format text of this Tab." 49 | }, 50 | "copyAllTabsInfo": { 51 | "message": "複製所有頁籤資訊 ({0})", 52 | "description": "feature - Copy all Tabs info." 53 | }, 54 | "copySelectedUrls": { 55 | "message": "複製選取範圍出現的網址 ({0})", 56 | "description": "feature - Analyze selected context to find URLs, copy all as custom format text." 57 | }, 58 | "openSelectedUrls": { 59 | "message": "開啟選取範圍出現的網址", 60 | "description": "feature - Analyze selected context to find URLs, open all to new Tabs." 61 | }, 62 | "copyPageUrls": { 63 | "message": "複製全頁面出現的網址 ({0})", 64 | "description": "feature - Analyze full page to find URLs, copy all as custom format text." 65 | }, 66 | "openPageUrls": { 67 | "message": "開啟全頁面出現的網址", 68 | "description": "feature - Analyze full page to find URLs, open all to new Tabs." 69 | }, 70 | "copySelectedImageUrls": { 71 | "message": "複製選取範圍出現的圖片網址 ({0})", 72 | "description": "feature - Analyze selected context to find image URLs, copy all as custom format text." 73 | }, 74 | "showSelectedImages": { 75 | "message": "開啟選取範圍出現的圖片網址", 76 | "description": "feature - Analyze selected context to find image URLs, open all to new Tabs." 77 | }, 78 | "copyPageImageUrls": { 79 | "message": "複製全頁面出現的圖片網址 ({0})", 80 | "description": "feature - Analyze full page to find image URLs, copy all as custom format text." 81 | }, 82 | "showPageImages": { 83 | "message": "開啟全頁面出現的圖片網址", 84 | "description": "feature - Analyze full page to find image URLs, open all to new Tabs." 85 | }, 86 | "copySelectedAObjectsInfo": { 87 | "message": "Copy selected objects info ({0})", 88 | "description": "feature - Analyze selected context to find objects, copy all info as custom format text." 89 | }, 90 | "copyPageAObjectsInfo": { 91 | "message": "Copy page objects info ({0})", 92 | "description": "feature - Analyze full page to find objects, copy all info as custom format text." 93 | }, 94 | "copySelectedImgObjectsInfo": { 95 | "message": "Copy selected objects info ({0})", 96 | "description": "feature - Analyze selected context to find objects, copy all info as custom format text." 97 | }, 98 | "copyPageImgObjectsInfo": { 99 | "message": "Copy page objects info ({0})", 100 | "description": "feature - Analyze full page to find objects, copy all as custom format text." 101 | }, 102 | "tabsLimitAlert": { 103 | "message": "開啟過多分頁,只開啟前{0}頁!", 104 | "description": "message - Max tabs limit at once open." 105 | }, 106 | "saveOk": { 107 | "message": "存檔完成", 108 | "description": "messsage - Data saved." 109 | }, 110 | "actUrlFormatEmpty":{ 111 | "message": "連結格式不能為空", 112 | "description": "messsage - Custom Urls format not be empty." 113 | }, 114 | "actImgUrlFormatEmpty":{ 115 | "message": "圖片連結格式不能為空", 116 | "description": "messsage - Custom image Urls format not be empty." 117 | }, 118 | "resetSettings": { 119 | "message": "預設值", 120 | "description": "UI button - reset to default settings." 121 | }, 122 | "saveSettings": { 123 | "message": "儲存目前設定", 124 | "description": "UI button - Save settings." 125 | }, 126 | "puretextFormatDelAroundSpace": { 127 | "message": "去除頭尾空白", 128 | "description": "UI setting - [Copy as pure text - format] - Delete context around space.(trim)" 129 | }, 130 | "puretextFormatDelInvisibleSpace": { 131 | "message": "去除隱藏空白", 132 | "description": "UI setting - [Copy as pure text - format] - Delete invisible space." 133 | }, 134 | "puretextFormatConvertQuotation": { 135 | "message": "轉換全形雙引號為半形雙引號", 136 | "description": "UI setting - [Copy as pure text - format] - Convert all type quotation to normal quotation." 137 | }, 138 | "puretextFormatConvertApostrophe": { 139 | "message": "轉換全形單引號為半形單引號", 140 | "description": "UI setting - [Copy as pure text - format] - Convert all type apostrophe to normal apostrophe." 141 | }, 142 | "puretextFormatConvertDash": { 143 | "message": "轉換全形破折號為半形破折號", 144 | "description": "UI setting - [Copy as pure text - format] - Convert all type dash to normal dash." 145 | }, 146 | "puretextFormatConvertSpace": { 147 | "message": "轉換全形空白為半形空白", 148 | "description": "UI setting - [Copy as pure text - format - Convert fullwidth space to normal space." 149 | }, 150 | "puretextFormatMergeNewline": { 151 | "message": "合併連續換行", 152 | "description": "UI setting - [Copy as pure text - format] - Merge newline." 153 | }, 154 | "puretextFormatMergeSpace": { 155 | "message": "合併連續半形空白", 156 | "description": "UI setting - [Copy as pure text - format] - Merge space." 157 | }, 158 | "puretextFormatMergeFullwidthSpace": { 159 | "message": "合併連續全形空白", 160 | "description": "UI setting - [Copy as pure text - format] - Merge fullwidth space." 161 | }, 162 | "puretextFormatMergeTabulation": { 163 | "message": "合併連續間隔字元(TAB)", 164 | "description": "UI setting - [Copy as pure text - format] - Merge tabulation." 165 | }, 166 | "puretextFormatMergeAllTypeSpace": { 167 | "message": "合併所有形式的連續空白為半形空白", 168 | "description": "UI setting - [Copy as pure text - format] - Merge all type space to one space." 169 | }, 170 | "htmltextFormatWithoutTag": { 171 | "message": "去除 HTML Tag", 172 | "description": "UI setting - [Copy as pure text - format] - Copy without HTML Tag." 173 | }, 174 | "linkCustomFormat": { 175 | "message": "連結自訂格式:", 176 | "description": "UI setting - [Copy Link info - Format] - Link custom format for copy feature." 177 | }, 178 | "tabCustomFormat": { 179 | "message": "頁籤自訂格式:", 180 | "description": "UI setting - [Copy Tab info - Format] - Tab custom format for copy feature." 181 | }, 182 | "tabsinfoCustomFormat": { 183 | "message": "頁籤資訊自訂格式:", 184 | "description": "UI setting - [Copy Tab info - Format] - Copy all Tabs info custom format." 185 | }, 186 | "fixUrlQuotEnd": { 187 | "message": "修正網址結尾的引號", 188 | "description": "UI setting - [Analyze URLs] - fix URLs end with quotation." 189 | }, 190 | "urlsCustomFormat": { 191 | "message": "複製連結自訂格式:", 192 | "description": "UI setting - [Analyze URLs] - Copy URLs custom format." 193 | }, 194 | "aObjectsCustomFormat": { 195 | "message": "Copy objects custom format: ", 196 | "description": "UI setting - [Analyze URLs] - Copy objects custom format." 197 | }, 198 | "imgObjectsCustomFormat": { 199 | "message": "Copy objects custom format: ", 200 | "description": "UI setting - [Analyze URLs] - Copy objects custom format." 201 | }, 202 | "imageUrlsCustomFormat": { 203 | "message": "複製圖片連結自訂格式:", 204 | "description": "UI setting - [Analyze URLs] - Copy Image URLs custom format." 205 | }, 206 | "maxTabsLimit": { 207 | "message": "開啟分頁最大數量:", 208 | "description": "UI setting - [Analyze URLs] - Max tabs limit at once open." 209 | }, 210 | "openOneImageDirectly": { 211 | "message": "直接開啟單一圖片連結", 212 | "description": "UI setting - [Analyze URLs] - Open a single Image link directly." 213 | }, 214 | "blobUrlToLocal": { 215 | "message": "Blob連結轉換為本機圖片 (速度很慢)", 216 | "description": "UI setting - [Analyze URLs] - Blob URLs convert to local images." 217 | }, 218 | "toolbarButtonAction": { 219 | "message": "工具列按鈕動作:", 220 | "description": "UI setting - [Toolbar button] - Toolbar button action." 221 | }, 222 | "keyboardShortcutAction": { 223 | "message": "鍵盤快速鍵動作: ", 224 | "description": "UI setting - [keybord shortcut] - keyboard shortcut action." 225 | }, 226 | "language":{ 227 | "message": "語言: ", 228 | "description": "UI setting - [Interface] - Language " 229 | }, 230 | "improveTrans":{ 231 | "message": "改善翻譯", 232 | "description": "UI setting - [Interface] - Improve translation " 233 | } 234 | } -------------------------------------------------------------------------------- /TextLinkyTool/background.js: -------------------------------------------------------------------------------- 1 | //Menus Methods 2 | function menuCombine(tab) 3 | { 4 | //Filter block list 5 | let taburl=tab.url; 6 | if (taburl.startsWith("https://addons.mozilla.org/") || taburl.startsWith("moz-extension://") || (taburl.startsWith("about:") && taburl != "about:blank")) { 7 | return; 8 | } 9 | 10 | //Toolbar button enable 11 | browser.browserAction.enable(tab.id); 12 | 13 | //Context menus combine 14 | commonLookup.getUserTltSetting().then((tlt)=>{ 15 | browser.menus.create({ 16 | id: commonLookup.actlist.copySelectedPuretext + "-0", 17 | title: commonLookup.getMessage(tlt.userTltSetting.locale,tlt.userTltSetting.localeData,"copySelectedPuretext"), 18 | contexts: ["selection"] 19 | }); 20 | browser.menus.create({ 21 | id: commonLookup.actlist.copySelectedHtmltext + "-0", 22 | title: commonLookup.getMessage(tlt.userTltSetting.locale,tlt.userTltSetting.localeData,"copySelectedHtmltext"), 23 | contexts: ["selection"] 24 | }); 25 | browser.menus.create({ 26 | id: "separator-0", 27 | type: "separator", 28 | contexts: ["selection"] 29 | }); 30 | browser.menus.create({ 31 | id: commonLookup.actlist.copyLinkName + "-0", 32 | title: commonLookup.getMessage(tlt.userTltSetting.locale,tlt.userTltSetting.localeData,"copyLinkName"), 33 | contexts: ["link"] 34 | }); 35 | browser.menus.create({ 36 | id: commonLookup.actlist.copyLinkUrl + "-0", 37 | title: commonLookup.getMessage(tlt.userTltSetting.locale,tlt.userTltSetting.localeData,"copyLinkUrl"), 38 | contexts: ["link"] 39 | }); 40 | tlt.userTltSetting.linkCustomFormatList.forEach((item,idx)=>{ 41 | browser.menus.create({ 42 | id: commonLookup.actlist.copyLinkFormatText + "-" + idx.toString(), 43 | title: commonLookup.getMessage(tlt.userTltSetting.locale,tlt.userTltSetting.localeData,"copyLinkFormatText").format(item.name), 44 | contexts: ["link"] 45 | }); 46 | }); 47 | browser.menus.create({ 48 | id: commonLookup.actlist.copyImageUrl + "-0", 49 | title: commonLookup.getMessage(tlt.userTltSetting.locale,tlt.userTltSetting.localeData,"copyImageUrl"), 50 | contexts: ["image"] 51 | }); 52 | browser.menus.create({ 53 | id: commonLookup.actlist.showImage + "-0", 54 | title: commonLookup.getMessage(tlt.userTltSetting.locale,tlt.userTltSetting.localeData,"showImage"), 55 | contexts: ["image"] 56 | }); 57 | browser.menus.create({ 58 | id: "separator-1", 59 | type: "separator", 60 | contexts: ["link", "image"] 61 | }); 62 | tlt.userTltSetting.urlsCustomFormatList.forEach((item,idx)=>{ 63 | browser.menus.create({ 64 | id: commonLookup.actlist.copySelectedUrls + "-" + idx.toString(), 65 | title: commonLookup.getMessage(tlt.userTltSetting.locale,tlt.userTltSetting.localeData,"copySelectedUrls").format(item.name), 66 | contexts: ["selection"] 67 | }); 68 | }); 69 | browser.menus.create({ 70 | id: commonLookup.actlist.openSelectedUrls + "-0", 71 | title: commonLookup.getMessage(tlt.userTltSetting.locale,tlt.userTltSetting.localeData,"openSelectedUrls"), 72 | contexts: ["selection"] 73 | }); 74 | browser.menus.create({ 75 | id: "separator-2", 76 | type: "separator", 77 | contexts: ["selection"] 78 | }); 79 | tlt.userTltSetting.imageUrlsCustomFormatList.forEach((item,idx)=>{ 80 | browser.menus.create({ 81 | id: commonLookup.actlist.copySelectedImageUrls + "-" + idx.toString(), 82 | title: commonLookup.getMessage(tlt.userTltSetting.locale,tlt.userTltSetting.localeData,"copySelectedImageUrls").format(item.name), 83 | contexts: ["selection"] 84 | }); 85 | }); 86 | browser.menus.create({ 87 | id: commonLookup.actlist.showSelectedImages + "-0", 88 | title: commonLookup.getMessage(tlt.userTltSetting.locale,tlt.userTltSetting.localeData,"showSelectedImages"), 89 | contexts: ["selection"] 90 | }); 91 | browser.menus.create({ 92 | id: commonLookup.actlist.copyPagePuretext + "-0", 93 | title: commonLookup.getMessage(tlt.userTltSetting.locale,tlt.userTltSetting.localeData,"copyPagePuretext"), 94 | contexts: ["page"] 95 | }); 96 | browser.menus.create({ 97 | id: commonLookup.actlist.copyPageHtmltext + "-0", 98 | title: commonLookup.getMessage(tlt.userTltSetting.locale,tlt.userTltSetting.localeData,"copyPageHtmltext"), 99 | contexts: ["page"] 100 | }); 101 | browser.menus.create({ 102 | id: "separator-3", 103 | type: "separator", 104 | contexts: ["page"] 105 | }); 106 | tlt.userTltSetting.urlsCustomFormatList.forEach((item,idx)=>{ 107 | browser.menus.create({ 108 | id: commonLookup.actlist.copyPageUrls + "-" + idx.toString(), 109 | title: commonLookup.getMessage(tlt.userTltSetting.locale,tlt.userTltSetting.localeData,"copyPageUrls").format(item.name), 110 | contexts: ["page"] 111 | }); 112 | }); 113 | browser.menus.create({ 114 | id: commonLookup.actlist.openPageUrls + "-0", 115 | title: commonLookup.getMessage(tlt.userTltSetting.locale,tlt.userTltSetting.localeData,"openPageUrls"), 116 | contexts: ["page"] 117 | }); 118 | browser.menus.create({ 119 | id: "separator-4", 120 | type: "separator", 121 | contexts: ["page"] 122 | }); 123 | tlt.userTltSetting.imageUrlsCustomFormatList.forEach((item,idx)=>{ 124 | browser.menus.create({ 125 | id: commonLookup.actlist.copyPageImageUrls + "-" + idx.toString(), 126 | title: commonLookup.getMessage(tlt.userTltSetting.locale,tlt.userTltSetting.localeData,"copyPageImageUrls").format(item.name), 127 | contexts: ["page"] 128 | }); 129 | }); 130 | browser.menus.create({ 131 | id: commonLookup.actlist.showPageImages + "-0", 132 | title: commonLookup.getMessage(tlt.userTltSetting.locale,tlt.userTltSetting.localeData,"showPageImages"), 133 | contexts: ["page"] 134 | }); 135 | browser.menus.create({ 136 | id: "separator-5", 137 | type: "separator", 138 | contexts: ["selection"] 139 | }); 140 | tlt.userTltSetting.aObjectsCustomFormatList.forEach((item,idx)=>{ 141 | browser.menus.create({ 142 | id: commonLookup.actlist.copySelectedAObjectsInfo + "-" + idx.toString(), 143 | title: commonLookup.getMessage(tlt.userTltSetting.locale,tlt.userTltSetting.localeData,"copySelectedAObjectsInfo").format(item.name), 144 | contexts: ["selection"] 145 | }); 146 | }); 147 | tlt.userTltSetting.imageUrlsCustomFormatList.forEach((item,idx)=>{ 148 | browser.menus.create({ 149 | id: commonLookup.actlist.copySelectedImgObjectsInfo + "-" + idx.toString(), 150 | title: commonLookup.getMessage(tlt.userTltSetting.locale,tlt.userTltSetting.localeData,"copySelectedImgObjectsInfo").format(item.name), 151 | contexts: ["selection"] 152 | }); 153 | }); 154 | browser.menus.create({ 155 | id: "separator-6", 156 | type: "separator", 157 | contexts: ["page"] 158 | }); 159 | tlt.userTltSetting.aObjectsCustomFormatList.forEach((item,idx)=>{ 160 | browser.menus.create({ 161 | id: commonLookup.actlist.copyPageAObjectsInfo + "-" + idx.toString(), 162 | title: commonLookup.getMessage(tlt.userTltSetting.locale,tlt.userTltSetting.localeData,"copyPageAObjectsInfo").format(item.name), 163 | contexts: ["page"] 164 | }); 165 | }); 166 | tlt.userTltSetting.imageUrlsCustomFormatList.forEach((item,idx)=>{ 167 | browser.menus.create({ 168 | id: commonLookup.actlist.copyPageImgObjectsInfo + "-" + idx.toString(), 169 | title: commonLookup.getMessage(tlt.userTltSetting.locale,tlt.userTltSetting.localeData,"copyPageImgObjectsInfo").format(item.name), 170 | contexts: ["page"] 171 | }); 172 | }); 173 | browser.menus.create({ 174 | id: commonLookup.actlist.copyTabName + "-0", 175 | title: commonLookup.getMessage(tlt.userTltSetting.locale,tlt.userTltSetting.localeData,"copyTabName"), 176 | contexts: ["tab"] 177 | }); 178 | browser.menus.create({ 179 | id: commonLookup.actlist.copyTabUrl + "-0", 180 | title: commonLookup.getMessage(tlt.userTltSetting.locale,tlt.userTltSetting.localeData,"copyTabUrl"), 181 | contexts: ["tab"] 182 | }); 183 | tlt.userTltSetting.tabCustomFormatList.forEach((item,idx)=>{ 184 | browser.menus.create({ 185 | id: commonLookup.actlist.copyTabFormatText + "-" + idx.toString(), 186 | title: commonLookup.getMessage(tlt.userTltSetting.locale,tlt.userTltSetting.localeData,"copyTabFormatText").format(item.name), 187 | contexts: ["tab"] 188 | }); 189 | }); 190 | browser.menus.create({ 191 | id: "separator-7", 192 | type: "separator", 193 | contexts: ["tab"] 194 | }); 195 | tlt.userTltSetting.tabsinfoCustomFormatList.forEach((item,idx)=>{ 196 | browser.menus.create({ 197 | id: commonLookup.actlist.copyAllTabsInfo + "-" + idx.toString(), 198 | title: commonLookup.getMessage(tlt.userTltSetting.locale,tlt.userTltSetting.localeData,"copyAllTabsInfo").format(item.name), 199 | contexts: ["tab"] 200 | }); 201 | }); 202 | }); 203 | } 204 | function tabActivated(tab) 205 | { 206 | //Menus rebuild 207 | browser.menus.removeAll().then(()=>{ 208 | browser.browserAction.disable(tab.tabId); 209 | browser.tabs.get(tab.tabId).then(menuCombine); 210 | }); 211 | } 212 | function tabUpdated(tabid, info, tab) 213 | { 214 | //Menus rebuild 215 | if (tab.status=="complete") 216 | browser.menus.removeAll().then(()=>{ 217 | browser.browserAction.disable(tab.id); 218 | menuCombine(tab); 219 | }); 220 | } 221 | 222 | //Main Methods 223 | browser.menus.onClicked.addListener((info, tab) => { 224 | browser.tabs.query({ 225 | currentWindow: true, 226 | active: true 227 | }).then((acttabs) => { 228 | let acttab = acttabs[0]; 229 | let actinfo = info.menuItemId.split("-"); 230 | let actid = actinfo[0]; 231 | let actidx = Number(actinfo[1]); 232 | switch (actid) { 233 | case commonLookup.actlist.copySelectedPuretext: 234 | case commonLookup.actlist.copyPagePuretext: 235 | case commonLookup.actlist.copySelectedHtmltext: 236 | case commonLookup.actlist.copyPageHtmltext: 237 | case commonLookup.actlist.copySelectedUrls: 238 | case commonLookup.actlist.copyPageUrls: 239 | case commonLookup.actlist.openSelectedUrls: 240 | case commonLookup.actlist.openPageUrls: 241 | case commonLookup.actlist.copySelectedImageUrls: 242 | case commonLookup.actlist.copyPageImageUrls: 243 | case commonLookup.actlist.copySelectedAObjectsInfo: 244 | case commonLookup.actlist.copyPageAObjectsInfo: 245 | case commonLookup.actlist.copySelectedImgObjectsInfo: 246 | case commonLookup.actlist.copyPageImgObjectsInfo: 247 | case commonLookup.actlist.showSelectedImages: 248 | case commonLookup.actlist.showPageImages: 249 | executeCommand(acttab, { 250 | cmd: actid, 251 | idx: actidx 252 | }); 253 | break; 254 | case commonLookup.actlist.copyLinkName: 255 | case commonLookup.actlist.copyLinkUrl: 256 | case commonLookup.actlist.copyLinkFormatText: 257 | executeCommand(acttab, { 258 | cmd: actid, 259 | data: { 260 | name: info.linkText, 261 | url: info.linkUrl 262 | }, 263 | idx: actidx 264 | }); 265 | break; 266 | case commonLookup.actlist.copyTabName: 267 | case commonLookup.actlist.copyTabUrl: 268 | case commonLookup.actlist.copyTabFormatText: 269 | executeCommand(acttab, { 270 | cmd: actid, 271 | data: { 272 | name: tab.title, 273 | url: tab.url 274 | }, 275 | idx: actidx 276 | }); 277 | break; 278 | case commonLookup.actlist.copyAllTabsInfo: 279 | let tabsInfo=[]; 280 | browser.tabs.query({currentWindow:true}).then((ti)=>{ 281 | ti.forEach((t)=>{ 282 | tabsInfo.push({name:t.title,url:t.url}); 283 | }); 284 | executeCommand(acttab, { 285 | cmd: actid, 286 | data: tabsInfo, 287 | idx: actidx 288 | }); 289 | }); 290 | break; 291 | case commonLookup.actlist.copyImageUrl: 292 | executeCommand(acttab, { 293 | cmd: actid, 294 | data: { 295 | url: info.srcUrl 296 | }, 297 | idx: actidx 298 | }); 299 | break; 300 | case commonLookup.actlist.showImage: 301 | commonLookup.getUserTltSetting().then((tlt) => { 302 | let data = [info.srcUrl]; 303 | let cmd = commonLookup.actlist.serverOpenTabs; 304 | if (tlt.userTltSetting.openOneImageDirectly === false) { 305 | cmd = commonLookup.actlist.serverShowImages; 306 | } 307 | serverAction({ 308 | cmd: cmd, 309 | data: data, 310 | idx: actidx 311 | }); 312 | }); 313 | break; 314 | default: 315 | console.log("no use"); 316 | } 317 | }); 318 | }); 319 | browser.browserAction.onClicked.addListener((tab) => { 320 | executeCommand(tab, { 321 | cmd: commonLookup.actlist.toolbarButtonAction 322 | }); 323 | }); 324 | browser.commands.onCommand.addListener((command) => { 325 | browser.tabs.query({ 326 | currentWindow: true, 327 | active: true 328 | }).then((acttabs) => { 329 | let acttab = acttabs[0]; 330 | executeCommand(acttab, { 331 | cmd: commonLookup.actlist.keyboardShortcutAction 332 | }); 333 | }); 334 | }); 335 | 336 | //Common Method 337 | //execute command on page 338 | function executeCommand(tab, msg) { 339 | browser.tabs.sendMessage(tab.id, msg) 340 | .then(() => { 341 | console.log("Command executed."); 342 | }) 343 | .catch((errmsg) => { 344 | console.error(`Command failed: ${errmsg}`); 345 | }); 346 | } 347 | 348 | //execute command on background 349 | function serverAction(msg) { 350 | switch (msg.cmd) { 351 | case commonLookup.actlist.serverOpenTabs: 352 | msg.data.forEach((u) => { 353 | browser.tabs.create({ 354 | url: u 355 | }); 356 | }); 357 | break; 358 | case commonLookup.actlist.serverShowImages: 359 | browser.tabs.create({ 360 | url: "imglist.html" 361 | }).then((tab) => { 362 | browser.tabs.onUpdated.addListener((tabId, changeInfo, tabInfo) => { 363 | if (tabId == tab.id) { 364 | executeCommand(tab, msg); 365 | } 366 | }); 367 | }); 368 | break; 369 | default: 370 | console.log("no use"); 371 | } 372 | } 373 | 374 | //tabs listener 375 | browser.tabs.onActivated.addListener(tabActivated); 376 | browser.tabs.onUpdated.addListener(tabUpdated); 377 | 378 | //background listener 379 | browser.runtime.onMessage.addListener(serverAction); -------------------------------------------------------------------------------- /TextLinkyTool/common.js: -------------------------------------------------------------------------------- 1 | //string.format 2 | String.prototype.format = function () { 3 | let formatted = this; 4 | for (let i = 0; i < arguments.length; i++) { 5 | let regexp = new RegExp("\\{" + i + "\\}", "giu"); 6 | formatted = formatted.replace(regexp, arguments[i]); 7 | } 8 | return formatted; 9 | }; 10 | 11 | //string.getFormatRule 12 | String.prototype.getFormatRule = function () { 13 | let ruletxt = this 14 | .replace(new RegExp(/\[\[name\]\]/, "giu"), "{0}") 15 | .replace(new RegExp(/\[\[url\]\]/, "giu"), "{1}") 16 | .replace(new RegExp(/\[\[n\]\]/, "giu"), "{2}") 17 | .replace(new RegExp(/\[\[t\]\]/, "giu"), "{3}") 18 | .replace(new RegExp(/\[\[index\]\]/, "giu"), "{4}") 19 | .replace(new RegExp(/\[\[potocol\]\]/, "giu"), "{5}") 20 | .replace(new RegExp(/\[\[host\]\]/, "giu"), "{6}") 21 | .replace(new RegExp(/\[\[hostname\]\]/, "giu"), "{7}") 22 | .replace(new RegExp(/\[\[port\]\]/, "giu"), "{8}") 23 | .replace(new RegExp(/\[\[pathname\]\]/, "giu"), "{9}") 24 | .replace(new RegExp(/\[\[search\]\]/, "giu"), "{10}") 25 | .replace(new RegExp(/\[\[hash\]\]/, "giu"), "{11}") 26 | .replace(new RegExp(/\[\[fullhost\]\]/, "giu"), "{12}") 27 | .replace(new RegExp(/\[\[fullpath\]\]/, "giu"), "{13}") 28 | return ruletxt; 29 | }; 30 | 31 | //element.clearElement 32 | Element.prototype.clearElement = function () { 33 | let ele = this; 34 | while (ele.firstChild) { ele.removeChild(ele.firstChild); } 35 | return ele; 36 | } 37 | 38 | //command lookup 39 | const commonLookup = { 40 | actlist: { 41 | copySelectedPuretext: "3", 42 | copySelectedHtmltext: "4", 43 | copyPagePuretext: "7", 44 | copyPageHtmltext: "8", 45 | copyLinkName: "1", 46 | copyLinkUrl: "2", 47 | copyLinkFormatText: "18", 48 | copyTabName: "15", 49 | copyTabUrl: "16", 50 | copyTabFormatText: "19", 51 | copyAllTabsInfo: "21", 52 | copyImageUrl: "17", 53 | showImage: "20", 54 | copySelectedUrls: "5", 55 | openSelectedUrls: "6", 56 | copySelectedImageUrls: "11", 57 | showSelectedImages: "12", 58 | copyPageUrls: "9", 59 | openPageUrls: "10", 60 | copyPageImageUrls: "13", 61 | showPageImages: "14", 62 | copySelectedAObjectsInfo: "22", 63 | copyPageAObjectsInfo: "23", 64 | copySelectedImgObjectsInfo: "24", 65 | copyPageImgObjectsInfo: "25", 66 | toolbarButtonAction: "A", 67 | keyboardShortcutAction: "B", 68 | serverOpenTabs: "S1", 69 | serverShowImages: "S2" 70 | }, 71 | defaultTltSetting: { 72 | openPagesLimit: 5, 73 | linkCustomFormatList: [{name:"BBCode Format",data:"[url=[[url]]][[name]][/url]"},{name:"Wiki Syntax",data:"[[[url]] [[name]]]"}], 74 | tabCustomFormatList: [{name:"BBCode Format",data:"[url=[[url]]][[name]][/url]"},{name:"Wiki Syntax",data:"[[[url]] [[name]]]"}], 75 | toolbarButtonAction: "12", 76 | toolbarButtonActionIdx: 0, 77 | keyboardShortcutAction: "3", 78 | keyboardShortcutActionIdx: 0, 79 | fixUrlQuotEnd: true, 80 | puretextFormat: { 81 | delAroundSpace: true, 82 | delInvisibleSpace: true, 83 | convertQuotation: true, 84 | convertApostrophe: true, 85 | convertDash: false, 86 | convertSpace: false, 87 | mergeNewline: true, 88 | mergeSpace: false, 89 | mergeFullwidthSpace: false, 90 | mergeTabulation: false, 91 | mergeAllTypeSpace: false 92 | }, 93 | htmltextFormatWithoutTag: false, 94 | openOneImageDirectly: true, 95 | tabsinfoCustomFormatList: [{name:"Custom",data:"[[index]].[[t]][[url]][[t]]([[name]])[[n]]"}], 96 | urlsCustomFormatList: [{name:"Custom",data:"[[url]][[n]]"}], 97 | imageUrlsCustomFormatList: [{name:"Custom",data:"[[url]][[n]]"}], 98 | aObjectsCustomFormatList: [{name:"Custom",data:"[[url]]([[name]])[[n]]"}], 99 | imgObjectsCustomFormatList: [{name:"Custom",data:"[[url]]([[name]])[[n]]"}], 100 | blobUrlToLocal: true, 101 | locale: "", 102 | localeData: {} 103 | }, 104 | getUserTltSetting() { 105 | return browser.storage.local.get({ 106 | userTltSetting: commonLookup.defaultTltSetting 107 | }); 108 | }, 109 | getMessage(locale,data,key) { 110 | if (locale === undefined || locale == "" || data === undefined || data[key] === undefined || data[key]["message"] === undefined ) { return browser.i18n.getMessage(key); } 111 | return data[key]["message"]; 112 | } 113 | }; -------------------------------------------------------------------------------- /TextLinkyTool/content.js: -------------------------------------------------------------------------------- 1 | //copy text to clipboard 2 | function copyToClipboard(text) { 3 | function oncopy(event) { 4 | document.removeEventListener("copy", oncopy, true); 5 | event.stopImmediatePropagation(); 6 | event.preventDefault(); 7 | event.clipboardData.setData("text/plain", text); 8 | } 9 | document.addEventListener("copy", oncopy, true); 10 | document.execCommand("copy"); 11 | } 12 | 13 | //get selected context text 14 | function getSelectedText() { 15 | let txt = ""; 16 | let selection = window.getSelection(); 17 | if (selection !== null) { 18 | txt = selection.toString(); 19 | } 20 | if (txt === "" && document.activeElement.value !== undefined) { 21 | txt = document.activeElement.value.substring(document.activeElement.selectionStart, document.activeElement.selectionEnd); 22 | } 23 | if (txt === "") { 24 | txt = document.body.innerText; 25 | } 26 | return txt; 27 | } 28 | 29 | //get selected context objects 30 | function getSelectedObject() { 31 | let body = document.body; 32 | let actelement = document.activeElement; 33 | let selection = window.getSelection(); 34 | if (selection === null || selection.rangeCount === 0 || selection.toString() === "") { 35 | if (actelement.value === undefined) { 36 | return body; 37 | } 38 | body = document.createElement("div"); 39 | body.appendChild(actelement.cloneNode(true)); 40 | } else { 41 | body = document.createElement("div"); 42 | body.appendChild(selection.getRangeAt(0).cloneContents().cloneNode(true)); 43 | } 44 | return body; 45 | } 46 | 47 | //copy selected context to pure text 48 | function copySelectedPureText() { 49 | commonLookup.getUserTltSetting().then((tlt) => { 50 | let txt = getSelectedText(); 51 | if (tlt.userTltSetting.puretextFormat.delAroundSpace === true) { 52 | txt = txt.replace(new RegExp(/^\s*|\s*$/,"gu"), ""); 53 | } 54 | if (tlt.userTltSetting.puretextFormat.delInvisibleSpace === true) { 55 | txt = txt.replace(new RegExp(/[\r\f\v]/,"gu"), ""); 56 | } 57 | if (tlt.userTltSetting.puretextFormat.convertQuotation === true) { 58 | txt = txt.replace(new RegExp(/[“”〝〞„〃]/,"gu"), '"'); 59 | } 60 | if (tlt.userTltSetting.puretextFormat.convertApostrophe === true) { 61 | txt = txt.replace(new RegExp(/[‵′‘’]/,"gu"), "'"); 62 | } 63 | if (tlt.userTltSetting.puretextFormat.convertDash === true) { 64 | txt = txt.replace(new RegExp(/[╴-─‒–—―]/,"gu"), "-"); 65 | } 66 | if (tlt.userTltSetting.puretextFormat.convertSpace === true) { 67 | txt = txt.replace(new RegExp(/[ ]/,"gu"), " "); 68 | } 69 | if (tlt.userTltSetting.puretextFormat.mergeNewline === true) { 70 | txt = txt.replace(new RegExp(/[\r]+/,"gu"), "").replace(new RegExp(/\s*\n\s*\n\s*/,"g"), "\n"); 71 | } 72 | if (tlt.userTltSetting.puretextFormat.mergeSpace === true) { 73 | txt = txt.replace(new RegExp(/[ ]+/,"gu"), " "); 74 | } 75 | if (tlt.userTltSetting.puretextFormat.mergeFullwidthSpace === true) { 76 | txt = txt.replace(new RegExp(/[ ]+/,"gu"), " "); 77 | } 78 | if (tlt.userTltSetting.puretextFormat.mergeTabulation === true) { 79 | txt = txt.replace(new RegExp(/[\t]+/,"gu"), "\t"); 80 | } 81 | if (tlt.userTltSetting.puretextFormat.mergeAllTypeSpace === true) { 82 | txt = txt.replace(new RegExp(/[\r\f\v]/,"gu"), "").replace(new RegExp(/[  \t]+/,"gu"), " "); 83 | } 84 | copyToClipboard(txt); 85 | }); 86 | } 87 | 88 | //copy selected context to HTML text 89 | function copySelectedHtmlText() { 90 | commonLookup.getUserTltSetting().then((tlt) => { 91 | let txt = ""; 92 | if (!tlt.userTltSetting.htmltextFormatWithoutTag) { 93 | txt = getSelectedObject().innerHTML; 94 | } 95 | else { 96 | txt = getSelectedObject().innerText; 97 | } 98 | copyToClipboard(txt); 99 | }); 100 | } 101 | 102 | //analyze selected context link URLs 103 | function getSelectedUrls(fixquot,blobtolocal) { 104 | let body = getSelectedObject().innerHTML + "\n" + getSelectedText(); 105 | let regex1 = new RegExp(/]*?\s+)?src=(["'])(.*?)\1/,"gi"); 106 | let imglist = body.match(regex1); 107 | if (imglist === null) { 108 | imglist = []; 109 | } else { 110 | imglist = imglist.map((s) => { 111 | return s.replace(new RegExp(/]*?\s+)?src=(["'])/,"i"), "").replace(new RegExp(/["']$/,"i"), ""); 112 | }); 113 | body = body.replace(regex1, ""); 114 | } 115 | let regex4 = new RegExp(/background\-image\:\s*url\(((\"\;)|\"|\')(.*?)((\"\;)|\"|\')\)/,"gi"); 116 | let cssbglist = body.match(regex4); 117 | if (cssbglist === null) { 118 | cssbglist = []; 119 | } else { 120 | cssbglist = cssbglist.map((s) => { 121 | return s.replace(new RegExp(/background\-image\:\ url\(((\"\;)|\"|\')/,"i"), "").replace(new RegExp(/((\"\;)|\"|\')\)$/,"i"), ""); 122 | }); 123 | body = body.replace(regex4, ""); 124 | } 125 | let regex5 = new RegExp(/\s+background=[\"\'](.*?)[\"\']/,"gi"); 126 | let attbglist = body.match(regex5); 127 | if (attbglist === null) { 128 | attbglist = []; 129 | } else { 130 | attbglist = attbglist.map((s) => { 131 | return s.replace(new RegExp(/\s+background=[\"\']/,"i"), "").replace(new RegExp(/["']$/,"i"), ""); 132 | }); 133 | body = body.replace(regex5, ""); 134 | } 135 | let regex2 = new RegExp(/]*?\s+)?href=(["'])(.*?)\1/,"gi"); 136 | let alist = body.match(regex2); 137 | if (alist === null) { 138 | alist = []; 139 | } else { 140 | alist = alist.map((s) => { 141 | return s.replace(new RegExp(/]*?\s+)?href=(["'])/,"i"), "").replace(new RegExp(/["']$/,"i"), ""); 142 | }); 143 | body = body.replace(regex2, ""); 144 | } 145 | let regex3 = new RegExp(/((ftp|https?):\/\/(www\.)?)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&\/=]*)/,"gi"); 146 | let matches = body.match(regex3); 147 | if (matches === null) { 148 | matches = []; 149 | } 150 | let urls = imglist.concat(cssbglist).concat(attbglist).concat(alist).concat(matches).map((h) => { 151 | let u = getAbsolutePath(h); 152 | if (fixquot === true) { u = u.replace(new RegExp(/\"*$/,"i"), ""); } 153 | return u; 154 | }).filter((value, index, self) => { 155 | return self.indexOf(value) === index; 156 | }); 157 | return urls; 158 | } 159 | 160 | //copy link URLs 161 | function copySelectedUrls(idx) { 162 | commonLookup.getUserTltSetting().then((tlt) => { 163 | let i = 0; 164 | let formatRule = tlt.userTltSetting.urlsCustomFormatList[idx].data.getFormatRule(); 165 | let formatText = ''; 166 | getSelectedUrls(tlt.userTltSetting.fixUrlQuotEnd,tlt.userTltSetting.blobUrlToLocal).forEach((url) => { 167 | i++; 168 | let u=new URL(url); 169 | formatText += formatRule.format("[[name]]", url, "\n", "\t", i.toString(),u.protocol,u.host,u.hostname,u.port,u.pathname,u.search,u.hash,u.origin,u.pathname+u.search+u.hash); 170 | }); 171 | copyToClipboard(formatText); 172 | }); 173 | } 174 | 175 | //open link URLs to browser tabs 176 | function openSelectedUrls() { 177 | commonLookup.getUserTltSetting().then((tlt) => { 178 | let urls = getSelectedUrls(tlt.userTltSetting.fixUrlQuotEnd,tlt.userTltSetting.blobUrlToLocal); 179 | let limit = Number(tlt.userTltSetting.openPagesLimit); 180 | if (urls.length > limit) { 181 | urls = urls.slice(0, limit); 182 | alert(commonLookup.getMessage(tlt.userTltSetting.locale,tlt.userTltSetting.localeData,"tabsLimitAlert").format(tlt.userTltSetting.openPagesLimit)); 183 | } 184 | browser.runtime.sendMessage({ 185 | cmd: commonLookup.actlist.serverOpenTabs, 186 | data: urls 187 | }); 188 | }); 189 | } 190 | 191 | //filter images URLs 192 | function getSelectedImageUrls(fixquot,blobtolocal) { 193 | let body = getSelectedObject().innerHTML; 194 | let regex1 = new RegExp(/]*?\s+)?src=(["'])(.*?)\1/,"gi"); 195 | let imglist1 = body.match(regex1); 196 | if (imglist1 === null) { 197 | imglist1 = []; 198 | } else { 199 | imglist1 = imglist1.map((s) => { 200 | return s.replace(new RegExp(/]*?\s+)?src=(["'])/,"i"), "").replace(new RegExp(/["']$/,"i"), ""); 201 | }); 202 | body = body.replace(regex1, ""); 203 | } 204 | let regex4 = new RegExp(/background\-image\:\s*url\(((\"\;)|\"|\')(.*?)((\"\;)|\"|\')\)/,"gi"); 205 | let cssbglist = body.match(regex4); 206 | if (cssbglist === null) { 207 | cssbglist = []; 208 | } else { 209 | cssbglist = cssbglist.map((s) => { 210 | return s.replace(new RegExp(/background\-image\:\ url\(((\"\;)|\"|\')/,"i"), "").replace(new RegExp(/((\"\;)|\"|\')\)$/,"i"), ""); 211 | }); 212 | body = body.replace(regex4, ""); 213 | } 214 | let regex5 = new RegExp(/\s+background=[\"\'](.*?)[\"\']/,"gi"); 215 | let attbglist = body.match(regex5); 216 | if (attbglist === null) { 217 | attbglist = []; 218 | } else { 219 | attbglist = attbglist.map((s) => { 220 | return s.replace(new RegExp(/\s+background=[\"\']/,"i"), "").replace(new RegExp(/["']$/,"i"), ""); 221 | }); 222 | body = body.replace(regex5, ""); 223 | } 224 | let regex = new RegExp(/\.(bmp|gif|jpe?g|png|tif?f|svg|webp)(\?.*)?$/,"gi"); 225 | let imglist2 = getSelectedUrls(fixquot,blobtolocal).filter((value, index, self) => { 226 | return regex.test(value); 227 | }); 228 | let urls = imglist1.concat(cssbglist).concat(attbglist).concat(imglist2).map((h) => { 229 | let u = getAbsolutePath(h); 230 | if (fixquot === true) { u = u.replace(new RegExp(/\"*$/,"i"), ""); } 231 | return u; 232 | }).filter((value, index, self) => { 233 | return self.indexOf(value) === index; 234 | }); 235 | let blobregex = new RegExp(/^blob:/,"i"); 236 | if (blobtolocal === true) { 237 | urls = urls.map((u)=>{ 238 | if (blobregex.test(u)) { u = getImageToLocal(u); } 239 | return u; 240 | }).filter((value, index, self) => { 241 | return self.indexOf(value) === index; 242 | }); 243 | } 244 | return urls; 245 | } 246 | 247 | //get absolute path 248 | const getAbsolutePath = ((href)=>{ 249 | const a = document.createElement("a"); 250 | const parser = new DOMParser; 251 | 252 | return function _getAbsolutePath() { 253 | a.href = href; 254 | if (a.protocol == "blob:" || a.protocol == "data:") { return href; } 255 | let dom = parser.parseFromString("" + (a.protocol + "//" + a.host + a.pathname + a.search + a.hash), "text/html"); 256 | return dom.body.textContent; 257 | }(); 258 | }); 259 | 260 | //get image to local 261 | const getImageToLocal = ((url) => { 262 | const canvas = document.createElement("canvas"); 263 | const ctx = canvas.getContext("2d"); 264 | 265 | return function _getImageToLocal() { 266 | let img=document.querySelector("img[src='" + url +"']"); 267 | canvas.width = img.naturalWidth; 268 | canvas.height = img.naturalHeight; 269 | ctx.drawImage(img, 0, 0); 270 | return canvas.toDataURL(); 271 | }(); 272 | }); 273 | 274 | //copy images link URLs 275 | function copySelectedImageUrls(idx) { 276 | commonLookup.getUserTltSetting().then((tlt) => { 277 | let i = 0; 278 | let formatRule = tlt.userTltSetting.imageUrlsCustomFormatList[idx].data.getFormatRule(); 279 | let formatText = ''; 280 | getSelectedImageUrls(tlt.userTltSetting.fixUrlQuotEnd,tlt.userTltSetting.blobUrlToLocal).forEach((url) => { 281 | i++; 282 | let u=new URL(url); 283 | formatText += formatRule.format("[[name]]", url, "\n", "\t", i.toString(),u.protocol,u.host,u.hostname,u.port,u.pathname,u.search,u.hash,u.origin,u.pathname+u.search+u.hash); 284 | }); 285 | copyToClipboard(formatText); 286 | }); 287 | } 288 | 289 | //show images 290 | function showSelectedImages() { 291 | commonLookup.getUserTltSetting().then((tlt) => { 292 | let urls = getSelectedImageUrls(tlt.userTltSetting.fixUrlQuotEnd,tlt.userTltSetting.blobUrlToLocal); 293 | let title = document.title; 294 | let location = document.location.toString(); 295 | browser.runtime.sendMessage({ 296 | cmd: commonLookup.actlist.serverShowImages, 297 | data: {"urls":urls,"title":title,"location":location} 298 | }); 299 | }); 300 | } 301 | 302 | //copy Objects Info 303 | function copySelectedAObjectsInfo(idx) { 304 | commonLookup.getUserTltSetting().then((tlt) => { 305 | let i = 0; 306 | let formatRule = tlt.userTltSetting.aObjectsCustomFormatList[idx].data.getFormatRule(); 307 | let formatText = ''; 308 | getSelectedObject().querySelectorAll("a").forEach((obj) => { 309 | i++; 310 | let u=new URL(obj.href); 311 | formatText += formatRule.format(obj.innerHTML.toString(), obj.href, "\n", "\t", i.toString(),u.protocol,u.host,u.hostname,u.port,u.pathname,u.search,u.hash,u.origin,u.pathname+u.search+u.hash); 312 | }); 313 | copyToClipboard(formatText); 314 | }); 315 | } 316 | 317 | //copy Objects Info 318 | function copySelectedImgObjectsInfo(idx) { 319 | commonLookup.getUserTltSetting().then((tlt) => { 320 | let i = 0; 321 | let formatRule = tlt.userTltSetting.imgObjectsCustomFormatList[idx].data.getFormatRule(); 322 | let formatText = ''; 323 | getSelectedObject().querySelectorAll("img").forEach((obj) => { 324 | i++; 325 | let u=new URL(obj.src); 326 | formatText += formatRule.format(obj.alt, obj.src, "\n", "\t", i.toString(),u.protocol,u.host,u.hostname,u.port,u.pathname,u.search,u.hash,u.origin,u.pathname+u.search+u.hash); 327 | }); 328 | copyToClipboard(formatText); 329 | }); 330 | } 331 | 332 | //copy link format text 333 | function copyLinkFormatText(name, url, idx) { 334 | commonLookup.getUserTltSetting().then((tlt) => { 335 | let formatRule = tlt.userTltSetting.linkCustomFormatList[idx].data.getFormatRule(); 336 | let u=new URL(url); 337 | let formatText = formatRule.format(name, url, "\n", "\t", "[[index]]",u.protocol,u.host,u.hostname,u.port,u.pathname,u.search,u.hash,u.origin,u.pathname+u.search+u.hash); 338 | copyToClipboard(formatText); 339 | }); 340 | } 341 | 342 | //copy tab format text 343 | function copyTabFormatText(name, url, idx) { 344 | commonLookup.getUserTltSetting().then((tlt) => { 345 | let formatRule = tlt.userTltSetting.tabCustomFormatList[idx].data.getFormatRule(); 346 | let u=new URL(url); 347 | let formatText = formatRule.format(name, url, "\n", "\t", "[[index]]",u.protocol,u.host,u.hostname,u.port,u.pathname,u.search,u.hash,u.origin,u.pathname+u.search+u.hash); 348 | copyToClipboard(formatText); 349 | }); 350 | } 351 | 352 | //copy all tabs info 353 | function copyAllTabsInfo(tabsInfo, idx) { 354 | commonLookup.getUserTltSetting().then((tlt) => { 355 | let i = 0; 356 | let formatRule = tlt.userTltSetting.tabsinfoCustomFormatList[idx].data.getFormatRule(); 357 | let formatText = ""; 358 | tabsInfo.forEach((ti) => { 359 | i++; 360 | let u=new URL(ti.url); 361 | formatText += formatRule.format(ti.name, ti.url, "\n", "\t", i.toString(),u.protocol,u.host,u.hostname,u.port,u.pathname,u.search,u.hash,u.origin,u.pathname+u.search+u.hash); 362 | }); 363 | copyToClipboard(formatText); 364 | }); 365 | } 366 | 367 | //toolbar button action 368 | function toolbarButtonAction() { 369 | commonLookup.getUserTltSetting().then((tlt) => { 370 | executeCommand({ 371 | cmd: tlt.userTltSetting.toolbarButtonAction, 372 | idx: tlt.userTltSetting.toolbarButtonActionIdx 373 | }); 374 | }); 375 | } 376 | 377 | 378 | //keyboard shortcut action 379 | function keyboardShortcutAction() { 380 | commonLookup.getUserTltSetting().then((tlt) => { 381 | executeCommand({ 382 | cmd: tlt.userTltSetting.keyboardShortcutAction, 383 | idx: tlt.userTltSetting.keyboardShortcutActionIdx 384 | }); 385 | }); 386 | } 387 | 388 | //execute command 389 | function executeCommand(msg) { 390 | if (msg.cmd === commonLookup.actlist.serverShowImages) { 391 | return; 392 | } 393 | switch (msg.cmd) { 394 | case commonLookup.actlist.copyPagePuretext: 395 | getTopWindow(); 396 | case commonLookup.actlist.copySelectedPuretext: 397 | copySelectedPureText(); 398 | break; 399 | case commonLookup.actlist.copyPageHtmltext: 400 | getTopWindow(); 401 | case commonLookup.actlist.copySelectedHtmltext: 402 | copySelectedHtmlText(); 403 | break; 404 | case commonLookup.actlist.copyPageUrls: 405 | getTopWindow(); 406 | case commonLookup.actlist.copySelectedUrls: 407 | copySelectedUrls(msg.idx); 408 | break; 409 | case commonLookup.actlist.openPageUrls: 410 | getTopWindow(); 411 | case commonLookup.actlist.openSelectedUrls: 412 | openSelectedUrls(); 413 | break; 414 | case commonLookup.actlist.copyPageImageUrls: 415 | getTopWindow(); 416 | case commonLookup.actlist.copySelectedImageUrls: 417 | copySelectedImageUrls(msg.idx); 418 | break; 419 | case commonLookup.actlist.showPageImages: 420 | getTopWindow(); 421 | case commonLookup.actlist.showSelectedImages: 422 | showSelectedImages(); 423 | break; 424 | case commonLookup.actlist.copyLinkName: 425 | case commonLookup.actlist.copyTabName: 426 | copyToClipboard(msg.data.name); 427 | break; 428 | case commonLookup.actlist.copyLinkUrl: 429 | case commonLookup.actlist.copyTabUrl: 430 | case commonLookup.actlist.copyImageUrl: 431 | copyToClipboard(msg.data.url); 432 | break; 433 | case commonLookup.actlist.copyLinkFormatText: 434 | copyLinkFormatText(msg.data.name, msg.data.url, msg.idx); 435 | break; 436 | case commonLookup.actlist.copyTabFormatText: 437 | copyTabFormatText(msg.data.name, msg.data.url, msg.idx); 438 | break; 439 | case commonLookup.actlist.copyPageAObjectsInfo: 440 | getTopWindow(); 441 | case commonLookup.actlist.copySelectedAObjectsInfo: 442 | copySelectedAObjectsInfo(msg.idx); 443 | break; 444 | case commonLookup.actlist.copyPageImgObjectsInfo: 445 | getTopWindow(); 446 | case commonLookup.actlist.copySelectedImgObjectsInfo: 447 | copySelectedImgObjectsInfo(msg.idx); 448 | break; 449 | case commonLookup.actlist.copyAllTabsInfo: 450 | copyAllTabsInfo(msg.data, msg.idx); 451 | break; 452 | case commonLookup.actlist.toolbarButtonAction: 453 | toolbarButtonAction(); 454 | break; 455 | case commonLookup.actlist.keyboardShortcutAction: 456 | keyboardShortcutAction(); 457 | break; 458 | default: 459 | console.log("no use"); 460 | } 461 | } 462 | 463 | //get top window 464 | function getTopWindow() 465 | { 466 | let topwindow=window.self; 467 | while (window.top!=topwindow) { topwindow=window.top; } 468 | topwindow.document.querySelectorAll("input,textarea").forEach((s)=>{s.blur();}); 469 | } 470 | 471 | //page listener 472 | browser.runtime.onMessage.addListener(executeCommand); -------------------------------------------------------------------------------- /TextLinkyTool/icons/icon16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yukisama/TextLinkyTool/ee0a93b3fe99b89310d304ffcfa3f0bc6186a7f3/TextLinkyTool/icons/icon16.png -------------------------------------------------------------------------------- /TextLinkyTool/icons/icon32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yukisama/TextLinkyTool/ee0a93b3fe99b89310d304ffcfa3f0bc6186a7f3/TextLinkyTool/icons/icon32.png -------------------------------------------------------------------------------- /TextLinkyTool/icons/icon48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yukisama/TextLinkyTool/ee0a93b3fe99b89310d304ffcfa3f0bc6186a7f3/TextLinkyTool/icons/icon48.png -------------------------------------------------------------------------------- /TextLinkyTool/icons/icon96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yukisama/TextLinkyTool/ee0a93b3fe99b89310d304ffcfa3f0bc6186a7f3/TextLinkyTool/icons/icon96.png -------------------------------------------------------------------------------- /TextLinkyTool/imglist.css: -------------------------------------------------------------------------------- 1 | a, img { display: block; float: left; clear: left; min-width: 1em; min-height: 1em; max-width: 95%; max-height: 95%; } 2 | #lblFrom {display: block; background-color: #F0F066; font-size: x-small; } 3 | .display { clear:initial; } -------------------------------------------------------------------------------- /TextLinkyTool/imglist.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | - pics loading... 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /TextLinkyTool/imglist.js: -------------------------------------------------------------------------------- 1 | //show images 2 | function showImages(msg) { 3 | if (msg.cmd !== commonLookup.actlist.serverShowImages) { 4 | return; 5 | } 6 | document.querySelector("#lblFrom").textContent = `${msg.data.title}(${msg.data.location})`; 7 | let frag = document.createDocumentFragment(); 8 | msg.data.urls.forEach((value) => { 9 | let i = document.createElement("img"); 10 | i.alt = value; 11 | i.src = value; 12 | let a = document.createElement("a"); 13 | a.href = value; 14 | a.target = "_blank"; 15 | a.appendChild(i); 16 | frag.appendChild(a); 17 | }); 18 | document.body.appendChild(frag); 19 | document.querySelector("#spnCount").textContent = ` - ${msg.data.urls.length.toString()} pics`; 20 | browser.runtime.onMessage.removeListener(showImages); 21 | } 22 | 23 | //color change 24 | function colorChange(e) { 25 | document.body.style.backgroundColor = e.target.value; 26 | } 27 | 28 | //display mode change 29 | function displayModeChange(e) { 30 | document.querySelectorAll("a").forEach((e) => { 31 | e.classList.toggle('display'); 32 | }); 33 | } 34 | 35 | //page listener 36 | browser.runtime.onMessage.addListener(showImages); 37 | document.querySelector("#inpColor").addEventListener("change", colorChange); 38 | document.querySelector("#inpDisplay").addEventListener("click", displayModeChange); -------------------------------------------------------------------------------- /TextLinkyTool/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "manifest_version": 2, 3 | "name": "Text Linky Tool", 4 | "version": "1.2.11", 5 | "author": "Yuki GUO", 6 | "homepage_url": "https://addons.mozilla.org/addon/text-linky-tool", 7 | "developer": { 8 | "name": "Yuki GUO", 9 | "url": "https://github.com/Yukisama/TextLinkyTool" 10 | }, 11 | "applications": { 12 | "gecko": { 13 | "id": "{3efee51a-7d3b-4412-a889-addc6ff6276b}", 14 | "strict_min_version": "56.0" 15 | } 16 | }, 17 | "description": "A useful tool for web links.\nFeatures:\nCopy as plain text.\nCopy as HTML source.\nCopy Link Name & URLs.\nCopy Tab Name & URLs.\nAnalyze image/page URLs.", 18 | "default_locale": "en", 19 | "icons": { 20 | "16": "icons/icon16.png", 21 | "32": "icons/icon32.png", 22 | "48": "icons/icon48.png", 23 | "96": "icons/icon96.png" 24 | }, 25 | "permissions": [ 26 | "", 27 | "menus", 28 | "contextMenus", 29 | "tabs", 30 | "activeTab", 31 | "clipboardWrite", 32 | "storage" 33 | ], 34 | "background": { 35 | "scripts": [ 36 | "common.js", 37 | "background.js" 38 | ] 39 | }, 40 | "content_scripts": [{ 41 | "js": [ 42 | "common.js", 43 | "content.js" 44 | ], 45 | "matches": [ 46 | "" 47 | ], 48 | "match_about_blank": true, 49 | "all_frames": true 50 | }], 51 | "options_ui": { 52 | "page": "options.html", 53 | "browser_style": true 54 | }, 55 | "web_accessible_resources": [ 56 | "_locales/*.json" 57 | ], 58 | "browser_action": { 59 | "default_icon": { 60 | "16": "icons/icon16.png", 61 | "32": "icons/icon32.png" 62 | }, 63 | "default_title": "Text Linky Tool" 64 | }, 65 | "commands": { 66 | "command_action": { 67 | "suggested_key": { 68 | "default": "F8" 69 | } 70 | } 71 | } 72 | } -------------------------------------------------------------------------------- /TextLinkyTool/options.css: -------------------------------------------------------------------------------- 1 | hr { border-color: #CCCCCC; margin: 1em 0; } 2 | 3 | #inpOpenPagesLimit { width: 4em; } 4 | #selToolbarButtonAction, #selKeyboardShortcutAction { font-size: small; } 5 | #lblSaved { color: red; visibility: hidden; } 6 | 7 | .formatdiv { display: inline-table; border: 1px solid black; padding: 0.5em; } 8 | .listName { width: 20%; font-size: small; } 9 | .listData { width: 60%; font-size: small; } 10 | .btnAdd { background-color: #009933;color:#000000; } 11 | .btnDel { background-color: #990033;color:#FFFFFF; } 12 | 13 | .urlpart span {color:blue; text-decoration: underline;} 14 | .iplang span {color:blue; text-decoration: underline;} 15 | .tipbox { position: relative; display: inline-block; text-decoration: underline; } 16 | .tiptxt { position: absolute; bottom: 100%; padding: 0.5em; display: none; 17 | border: 1px solid #000000; border-radius: 1em; background-color: #FFFFFF; white-space: nowrap; } 18 | .tipbox:hover .tiptxt { display: block; } -------------------------------------------------------------------------------- /TextLinkyTool/options.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 |

Copy as pure text - Format:

11 |
12 | delete
13 |
14 |
15 |
16 |
17 | convert
18 |
19 |
20 |
21 |
22 |
23 |
24 | merge
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |

Copy as HTML text - Format:

33 |
34 |
35 |

Copy Link info - Format:

36 |
39 | 40 |
41 |
42 |
43 |

Copy Tab info - Format:

44 |
47 | 48 |
49 |

50 |
53 |
54 | 55 |
56 |
57 |
58 |

Analyze URLs:

59 |

60 |
63 |
64 | 65 |
66 |

67 |
70 |
71 | 72 |
73 |

74 | 75 |

76 |

77 |
78 |
79 |

Analyze Objects:

80 |
83 |
84 | 85 |
86 |

87 |
90 |
91 | 92 |
93 |

94 |
95 |

Toolbar button:

96 | 97 | 105 |
106 |
107 |

Keybord shortcut: F8

108 | 109 | 117 |
118 |
119 |

Interface:

120 | 121 | 134 |
Improve translation
135 |
136 |
137 | 138 | 139 |
140 | 141 | 142 | 143 | 144 |
145 | URL part text format:
146 |
147 | [[url]] - URL text
148 | [[host]] - URL host text
149 | [[fullhost]] - URL full host text
150 | [[fullpath]] - URL full path text
151 |
152 | [[potocol]] - URL potocol text
153 | [[hostname]] - URL hostname text
154 | [[port]] - URL port text
155 | [[pathname]] - URL pathname text
156 | [[search]] - URL search text
157 | [[hash]] - URL hash text
158 |
159 |
160 | Improve translation:
161 |
162 | Fork the repository from
Github ,
163 | apply your changes and create a pull request.
164 |
165 | 166 | -------------------------------------------------------------------------------- /TextLinkyTool/options.js: -------------------------------------------------------------------------------- 1 | //page ready 2 | function pageReady() { 3 | commonLookup.getUserTltSetting().then((tlt)=>{ 4 | //i18n message support for page elements 5 | document.querySelectorAll("[data-i18n]").forEach(ele => { 6 | let ctxt = commonLookup.getMessage(tlt.userTltSetting.locale,tlt.userTltSetting.localeData,ele.getAttribute("data-i18n")); 7 | switch (ele.tagName){ 8 | case "INPUT": 9 | ele.value = ctxt; 10 | //case "LABEL": case "OPTION": 11 | default: 12 | ele.textContent = ctxt; 13 | } 14 | }); 15 | 16 | //get option settings 17 | showOptionSettings(tlt.userTltSetting); 18 | }); 19 | 20 | //Tooltips active 21 | document.querySelectorAll(".tiptxt").forEach((ele)=>{ 22 | let tptxt = ele.cloneNode(true); 23 | let boxcss = ele.getAttribute("data-boxcss"); 24 | tptxt.attributes.removeNamedItem("data-boxcss"); 25 | document.querySelectorAll(`.tipbox.${boxcss}`).forEach((box)=>{ box.appendChild(tptxt.cloneNode(true)); }); 26 | }); 27 | } 28 | 29 | //custom formats list delete 30 | function listDel(list,idx) 31 | { 32 | clearSavedMessage(); 33 | list.querySelectorAll(`[data-idx="${idx}"]`).forEach(ele => ele.remove()); 34 | } 35 | 36 | //custom formats list add 37 | function listAdd(list,name,value,idx) 38 | { 39 | clearSavedMessage(); 40 | let frag = document.createDocumentFragment(); 41 | let inpName = document.createElement("input"); 42 | inpName.setAttribute("tpye","text"); 43 | inpName.setAttribute("class","listName"); 44 | inpName.setAttribute("value",name); 45 | inpName.setAttribute("maxlength","40"); 46 | inpName.setAttribute("data-idx",idx.toString()); 47 | inpName.addEventListener("change", clearSavedMessage); 48 | inpName.addEventListener("keypress", clearSavedMessage); 49 | frag.appendChild(inpName); 50 | let inpData = document.createElement("input"); 51 | inpData.setAttribute("tpye","text"); 52 | inpData.setAttribute("class","listData"); 53 | inpData.setAttribute("value",value); 54 | inpData.setAttribute("maxlength","200"); 55 | inpData.setAttribute("data-idx",idx.toString()); 56 | inpData.addEventListener("change", clearSavedMessage); 57 | inpData.addEventListener("keypress", clearSavedMessage); 58 | frag.appendChild(inpData); 59 | let inpDel = document.createElement("input"); 60 | inpDel.setAttribute("type","button"); 61 | inpDel.setAttribute("class","btnDel"); 62 | inpDel.setAttribute("value","-"); 63 | inpDel.setAttribute("data-idx",idx.toString()); 64 | inpDel.addEventListener("click",function(e){ 65 | let list = e.target.parentNode; 66 | let idx = e.target.getAttribute("data-idx"); 67 | listDel(list,idx); 68 | changeToolbarAction(); 69 | changeKeyboardAction(); 70 | }); 71 | frag.appendChild(inpDel); 72 | let br = document.createElement("br"); 73 | br.setAttribute("data-idx",idx.toString()); 74 | frag.appendChild(br); 75 | list.appendChild(frag); 76 | changeToolbarAction(); 77 | changeKeyboardAction(); 78 | } 79 | 80 | //button add list click event 81 | function btnAddClick(e) 82 | { 83 | let list = document.getElementById(e.target.getAttribute("data-listid")); 84 | let name = e.target.getAttribute("data-name"); 85 | let value = e.target.getAttribute("data-value"); 86 | let dels = list.querySelectorAll("input.btnDel"); 87 | let idx = dels.length==0?0:Number(dels[dels.length-1].getAttribute("data-idx")) + 1; 88 | listAdd(list,name,value,idx); 89 | } 90 | 91 | //get custom formats list data 92 | function getListData(list) 93 | { 94 | let result=[]; 95 | if (list==null) {return result;} 96 | let names = list.querySelectorAll(".listName[data-idx]"); 97 | let datas = list.querySelectorAll(".listData[data-idx]"); 98 | for (let i=0;ires.json()); 110 | return data; 111 | } 112 | 113 | //show option settings 114 | function showOptionSettings(setting) { 115 | let frag=null; 116 | document.querySelector("#inpOpenPagesLimit").value = setting.openPagesLimit; 117 | frag=document.createDocumentFragment(); 118 | setting.linkCustomFormatList.forEach( function(item,itemidx) { listAdd(frag,item.name,item.data,itemidx); }); 119 | document.querySelector("#divLinkCustomFormat").clearElement().appendChild(frag); 120 | frag=null; 121 | frag=document.createDocumentFragment(); 122 | setting.tabCustomFormatList.forEach( function(item,itemidx) { listAdd(frag,item.name,item.data,itemidx); }); 123 | document.querySelector("#divTabCustomFormat").clearElement().appendChild(frag); 124 | frag=null; 125 | document.querySelector("#selToolbarButtonAction").value = setting.toolbarButtonAction; 126 | document.querySelector("#selKeyboardShortcutAction").value = setting.keyboardShortcutAction; 127 | document.querySelector("#inpFixUrlQuotEnd").checked = setting.fixUrlQuotEnd; 128 | document.querySelector("#inpPuretextFormatDelAroundSpace").checked = setting.puretextFormat.delAroundSpace; 129 | document.querySelector("#inpPuretextFormatDelInvisibleSpace").checked = setting.puretextFormat.delInvisibleSpace; 130 | document.querySelector("#inpPuretextFormatConvertQuotation").checked = setting.puretextFormat.convertQuotation; 131 | document.querySelector("#inpPuretextFormatConvertApostrophe").checked = setting.puretextFormat.convertApostrophe; 132 | document.querySelector("#inpPuretextFormatConvertDash").checked = setting.puretextFormat.convertDash; 133 | document.querySelector("#inpPuretextFormatConvertSpace").checked = setting.puretextFormat.convertSpace; 134 | document.querySelector("#inpPuretextFormatMergeNewline").checked = setting.puretextFormat.mergeNewline; 135 | document.querySelector("#inpPuretextFormatMergeSpace").checked = setting.puretextFormat.mergeSpace; 136 | document.querySelector("#inpPuretextFormatMergeFullwidthSpace").checked = setting.puretextFormat.mergeFullwidthSpace; 137 | document.querySelector("#inpPuretextFormatMergeTabulation").checked = setting.puretextFormat.mergeTabulation; 138 | document.querySelector("#inpPuretextFormatMergeAllTypeSpace").checked = setting.puretextFormat.mergeAllTypeSpace; 139 | document.querySelector("#inpHtmltextFormatWithoutTag").checked = setting.htmltextFormatWithoutTag; 140 | document.querySelector("#inpOpenOneImageDirectly").checked = setting.openOneImageDirectly; 141 | frag=document.createDocumentFragment(); 142 | setting.tabsinfoCustomFormatList.forEach( function(item,itemidx) { listAdd(frag,item.name,item.data,itemidx); }); 143 | document.querySelector("#divTabsinfoCustomFormat").clearElement().appendChild(frag); 144 | frag=null; 145 | frag=document.createDocumentFragment(); 146 | setting.urlsCustomFormatList.forEach( function(item,itemidx) { listAdd(frag,item.name,item.data,itemidx); }); 147 | document.querySelector("#divUrlsCustomFormat").clearElement().appendChild(frag); 148 | frag=null; 149 | frag=document.createDocumentFragment(); 150 | setting.imageUrlsCustomFormatList.forEach( function(item,itemidx) { listAdd(frag,item.name,item.data,itemidx); }); 151 | document.querySelector("#divImageUrlsCustomFormat").clearElement().appendChild(frag); 152 | frag=null; 153 | frag=document.createDocumentFragment(); 154 | setting.aObjectsCustomFormatList.forEach( function(item,itemidx) { listAdd(frag,item.name,item.data,itemidx); }); 155 | document.querySelector("#divAObjectsCustomFormat").clearElement().appendChild(frag); 156 | frag=null; 157 | frag=document.createDocumentFragment(); 158 | setting.imgObjectsCustomFormatList.forEach( function(item,itemidx) { listAdd(frag,item.name,item.data,itemidx); }); 159 | document.querySelector("#divImgObjectsCustomFormat").clearElement().appendChild(frag); 160 | frag=null; 161 | document.querySelector("#inpBlobUrlToLocal").checked = setting.blobUrlToLocal; 162 | document.querySelector("#selInterfaceLanguage").value = setting.locale; 163 | changeToolbarAction(); 164 | document.querySelector("#selToolbarButtonActionIdx").value = setting.toolbarButtonActionIdx.toString(); 165 | changeKeyboardAction(); 166 | document.querySelector("#selKeyboardShortcutActionIdx").value = setting.keyboardShortcutActionIdx.toString(); 167 | } 168 | 169 | //set option settings 170 | async function setOptionSettings(e) { 171 | let ldata = await getlocaleData(document.querySelector("#selInterfaceLanguage").value); 172 | let tlt = { 173 | openPagesLimit: document.querySelector("#inpOpenPagesLimit").value, 174 | linkCustomFormatList: getListData(document.querySelector("#divLinkCustomFormat")), 175 | tabCustomFormatList: getListData(document.querySelector("#divTabCustomFormat")), 176 | toolbarButtonAction: document.querySelector("#selToolbarButtonAction").value, 177 | toolbarButtonActionIdx: document.querySelector("#selToolbarButtonActionIdx").selectedIndex, 178 | keyboardShortcutAction: document.querySelector("#selKeyboardShortcutAction").value, 179 | keyboardShortcutActionIdx: document.querySelector("#selKeyboardShortcutActionIdx").selectedIndex, 180 | fixUrlQuotEnd: document.querySelector("#inpFixUrlQuotEnd").checked, 181 | puretextFormat: { 182 | delAroundSpace: document.querySelector("#inpPuretextFormatDelAroundSpace").checked, 183 | delInvisibleSpace: document.querySelector("#inpPuretextFormatDelInvisibleSpace").checked, 184 | convertQuotation: document.querySelector("#inpPuretextFormatConvertQuotation").checked, 185 | convertApostrophe: document.querySelector("#inpPuretextFormatConvertApostrophe").checked, 186 | convertDash: document.querySelector("#inpPuretextFormatConvertDash").checked, 187 | convertSpace: document.querySelector("#inpPuretextFormatConvertSpace").checked, 188 | mergeNewline: document.querySelector("#inpPuretextFormatMergeNewline").checked, 189 | mergeSpace: document.querySelector("#inpPuretextFormatMergeSpace").checked, 190 | mergeFullwidthSpace: document.querySelector("#inpPuretextFormatMergeFullwidthSpace").checked, 191 | mergeTabulation: document.querySelector("#inpPuretextFormatMergeTabulation").checked, 192 | mergeAllTypeSpace: document.querySelector("#inpPuretextFormatMergeAllTypeSpace").checked 193 | }, 194 | htmltextFormatWithoutTag: document.querySelector("#inpHtmltextFormatWithoutTag").checked, 195 | openOneImageDirectly: document.querySelector("#inpOpenOneImageDirectly").checked, 196 | tabsinfoCustomFormatList: getListData(document.querySelector("#divTabsinfoCustomFormat")), 197 | urlsCustomFormatList: getListData(document.querySelector("#divUrlsCustomFormat")), 198 | imageUrlsCustomFormatList: getListData(document.querySelector("#divImageUrlsCustomFormat")), 199 | aObjectsCustomFormatList: getListData(document.querySelector("#divAObjectsCustomFormat")), 200 | imgObjectsCustomFormatList: getListData(document.querySelector("#divImgObjectsCustomFormat")), 201 | blobUrlToLocal: document.querySelector("#inpBlobUrlToLocal").checked, 202 | locale: document.querySelector("#selInterfaceLanguage").value, 203 | localeData: ldata 204 | } 205 | 206 | //checking settings 207 | if ((tlt.toolbarButtonAction==commonLookup.actlist.copySelectedUrls && tlt.toolbarButtonActionIdx==-1) || 208 | (tlt.keyboardShortcutAction==commonLookup.actlist.copySelectedUrls && tlt.keyboardShortcutActionIdx==-1)) 209 | { 210 | commonLookup.getUserTltSetting().then((tlt)=>{ 211 | alert(commonLookup.getMessage(tlt.userTltSetting.locale,tlt.userTltSetting.localeData,"actUrlFormatEmpty")); 212 | }); 213 | return; 214 | } 215 | if ((tlt.toolbarButtonAction==commonLookup.actlist.copySelectedImageUrls && tlt.toolbarButtonActionIdx==-1) || 216 | (tlt.keyboardShortcutAction==commonLookup.actlist.copySelectedImageUrls && tlt.keyboardShortcutActionIdx==-1)) 217 | { 218 | commonLookup.getUserTltSetting().then((tlt)=>{ 219 | alert(commonLookup.getMessage(tlt.userTltSetting.locale,tlt.userTltSetting.localeData,"actImgUrlFormatEmpty")); 220 | }); 221 | return; 222 | } 223 | 224 | //save settings 225 | browser.storage.local.set({ 226 | "userTltSetting": tlt 227 | }); 228 | document.querySelector("#lblSaved").style.visibility = "visible"; 229 | } 230 | 231 | //clear saved message 232 | function clearSavedMessage() { 233 | document.querySelector("#lblSaved").style.visibility = "hidden"; 234 | } 235 | 236 | //clear saved message 237 | function resetOptionSettings() { 238 | clearSavedMessage(); 239 | showOptionSettings(commonLookup.defaultTltSetting); 240 | } 241 | 242 | //fill ActionIdx list 243 | function fillActionIdx(actqs,selqs){ 244 | let sel=document.querySelector(selqs); 245 | let list=[]; 246 | if (document.querySelector(actqs).value==commonLookup.actlist.copySelectedUrls) 247 | { 248 | list=getListData(document.querySelector("#divUrlsCustomFormat")); 249 | } 250 | if (document.querySelector(actqs).value==commonLookup.actlist.copySelectedImageUrls) 251 | { 252 | list=getListData(document.querySelector("#divImageUrlsCustomFormat")); 253 | } 254 | let frag=document.createDocumentFragment(); 255 | list.forEach((item,idx)=>{ 256 | let op = document.createElement("option"); 257 | op.setAttribute("value",idx.toString()); 258 | op.text = (idx+1).toString() + " - " + item.name; 259 | frag.appendChild(op); 260 | }); 261 | sel.querySelectorAll("option").forEach(ele => ele.remove()); 262 | sel.appendChild(frag); 263 | } 264 | 265 | //change ToolbarButtonAction 266 | function changeToolbarAction(){ 267 | fillActionIdx("#selToolbarButtonAction","#selToolbarButtonActionIdx"); 268 | } 269 | 270 | //change KeyboardShortcutAction 271 | function changeKeyboardAction(){ 272 | fillActionIdx("#selKeyboardShortcutAction","#selKeyboardShortcutActionIdx"); 273 | } 274 | 275 | 276 | //page listener 277 | document.addEventListener("DOMContentLoaded", pageReady); 278 | document.querySelector("#inpSaveSettings").addEventListener("click", setOptionSettings); 279 | document.querySelector("#inpResetSettings").addEventListener("click", resetOptionSettings); 280 | document.querySelector("#selToolbarButtonAction").addEventListener("change", changeToolbarAction); 281 | document.querySelector("#divUrlsCustomFormat").addEventListener("focusout",e=> {changeToolbarAction();e.stopPropagation();}); 282 | document.querySelector("#selKeyboardShortcutAction").addEventListener("change", changeKeyboardAction); 283 | document.querySelector("#divImageUrlsCustomFormat").addEventListener("focusout",e=> {changeToolbarAction();e.stopPropagation();}); 284 | document.querySelectorAll("form input").forEach((e) => e.addEventListener("change", clearSavedMessage)); 285 | document.querySelectorAll("form input").forEach((e) => e.addEventListener("keypress", clearSavedMessage)); 286 | document.querySelectorAll("select").forEach((e) => e.addEventListener("change", clearSavedMessage)); 287 | document.querySelectorAll(".btnAdd").forEach((e) => e.addEventListener("click",btnAddClick)); -------------------------------------------------------------------------------- /change.log: -------------------------------------------------------------------------------- 1 | Version 1.2.11 2019-06-04 2 | ------ 3 | Fix wiki syntax format. 4 | 5 | Features complated: 6 | 22. copy selected objects info. 7 | 23. copy page objects info. 8 | 24. copy selected objects info. 9 | 25. copy page objects info. 10 | 11 | 12 | Version 1.2.10 2018-11-17 13 | ------ 14 | Fix analyze custom formats not enable bug. 15 | 16 | 17 | Version 1.2.9 2018-10-01 18 | ------ 19 | Update ru locale. [ Thanks to solokot ] 20 | Fix options read setting bug. 21 | 22 | 23 | Version 1.2.8 2018-08-19 24 | ------ 25 | Toolbar button action support copy URLs with custom format. 26 | Keyboard shortcut action support copy Urls with custom format. 27 | Options - copy URLs format list. 28 | Options - copy ImageURLs format list. 29 | Options - Hide not support locate. 30 | Update lacate. 31 | Fix context menu separator line. 32 | Fix a few bugs. 33 | 34 | 35 | Version 1.2.7 2018-06-07 36 | ------ 37 | Add ru locale. [ Thanks to solokot ] 38 | Modify ja locale. 39 | Options - URL part text tooltips. 40 | Options - Improve translation tooltips. 41 | Images Viewer - display loading status. 42 | Images Viewer - display origin page title & URL. 43 | Fix a few bugs. 44 | 45 | 46 | Version 1.2.6 2018-05-31 47 | ------ 48 | Support multiple custom formats. ( default suppport BBCode Format / Wiki Syntax / Custom Format ) 49 | Support more custom formats text. ( URL part text support potocol/host/port/path/search/hash ) 50 | Custom options - locale language. 51 | Performance tuning. 52 | 53 | 54 | Version 1.2.5 2018-05-18 55 | ------ 56 | Support blob/data style URL. 57 | Custom options - Blob URL to local URL. 58 | Custom options format name can be setting. 59 | 60 | 61 | Version 1.2.4 2018-03-14 62 | ------ 63 | Modify en locale. 64 | Modify zh_TW locale. 65 | Modify zh_CN locale. 66 | Modify ja locale. 67 | Disable toolbar button in block site (addons.mozilla.org / about:newtab / about:config) 68 | Hide contextmenus in block site (addons.mozilla.org / about:newtab / about:config) 69 | 70 | 71 | Version 1.2.3 2018-03-08 72 | ------ 73 | Support copy features on "New Tab"( about:blank ). 74 | ***Cannot support any features on "New Tab"( about:newtab / about:home ), becouse Mozilla policy. [ extend URL: https://bugzil.la/1270412 ] 75 | Add ja locale. 76 | 77 | 78 | Version 1.2.2 2017-12-04 79 | ------ 80 | Fix analyze full page URLs in frame/iframe. 81 | enhance analyze URLs of background images. 82 | 83 | 84 | Version 1.2.1 2017-10-28 85 | ------ 86 | Bugs fix. 87 | 88 | 89 | Version 1.2.0 2017-10-27 90 | ------ 91 | Change version name. (1.1.7 to 1.2.0) 92 | 93 | 94 | Version 1.1.7 2017-10-27 95 | ------ 96 | Custom options - Open a single Image link directly 97 | Custom options - Copy all tabs info custom format 98 | Custom options - Copy URLs custom format 99 | Custom options - Copy Image URLs custom format 100 | 101 | Features complated: 102 | 21.Copy all tabs info 103 | 104 | 105 | Version 1.1.6 2017-10-27 106 | ------ 107 | Optimization code. 108 | Image Viewer - display style button. 109 | Option page add default button. 110 | 111 | 112 | Version 1.1.5 2017-10-26 113 | ------ 114 | Bug fix. 115 | Optimization code. 116 | Custom options - Copy as HTML text - Format. 117 | Enhance get selection Objects for "input/textArea" elements. 118 | 119 | 120 | Version 1.1.4 2017-10-23 121 | ------ 122 | Custom options - Copy as pure text - Format. 123 | 124 | 125 | Version 1.1.3 2017-10-23 126 | ------ 127 | Bug fix. 128 | Custom options - fix URLs end with quotation. 129 | Enhance analyze images feature. 130 | "Images Viewer" add pics count. 131 | 132 | 133 | Version 1.1.2 2017-10-22 134 | ------ 135 | Custom options - Keyboard shortcut action 136 | Add keyboard shortcut: F8 137 | 138 | 139 | Version 1.1.1 2017-10-12 140 | ------ 141 | Optimization code. 142 | 143 | Features complated: 144 | 20.Show Image 145 | 146 | 147 | Version 1.1.0 2017-10-12 148 | ------ 149 | Change version name. (1.0.6 to 1.1.0) 150 | 151 | 152 | Version 1.0.6 2017-10-12 153 | ------ 154 | Custom options - Toolbar button action 155 | Add "Browser toolbar button". 156 | 157 | 158 | Version 1.0.5 2017-10-10 159 | ------ 160 | Fix a few bugs. 161 | Add "Images Viewer" Page. 162 | "Show selected/page images" show in new tab. 163 | Custom options - Link custom format 164 | Custom options - Tab custom format 165 | 166 | Features complated: 167 | 18.Copy Link format text 168 | 19.Copy Tab format text 169 | 170 | 171 | Version 1.0.4 2017-10-09 172 | ------ 173 | Add options page. 174 | Custom options - max open tabs limit. 175 | Enable "Open page URLs" feature. 176 | 177 | Features complated: 178 | 11.Copy selected image urls 179 | 12.Show selected images 180 | 13.Copy page image urls 181 | 14.Show page images 182 | 15.Copy Tab Name 183 | 16.Copy Tab URL 184 | 17.Copy Image URL 185 | 186 | 187 | Version 1.0.3 2017-10-05 188 | ------ 189 | Add zh_CN locale. [ Thanks to YFdyh000 ] 190 | Modify zh_TW locale. 191 | 192 | 193 | Version 1.0.2 2017-10-03 194 | ------ 195 | relative URLs can be correctly analyzed. 196 | 197 | 198 | Version 1.0.1 2017-10-03 199 | ------ 200 | Modify en locale. 201 | 202 | 203 | Version 1.0.0 2017-10-02 204 | ------ 205 | Fix a few bugs. 206 | Disable "Open page URLs" feature. 207 | Release to AMO. [ https://addons.mozilla.org/addon/text-linky-tool/ ] 208 | 209 | 210 | Version 1.0beta 2017-10-01 211 | ------ 212 | Languages complated: 213 | 1.en 214 | 2.zh_TW 215 | 216 | Features complated: 217 | 1.Copy Link Name 218 | 2.Copy Link URL 219 | 3.Copy selected pure text 220 | 4.Copy selected HTML text 221 | 5.Copy selected URLs 222 | 6.Open selected URLs to new tabs 223 | 7.Copy page pure text 224 | 8.Copy page HTML text 225 | 9.Copy page URLs 226 | 10.Open page URLs to new tabs 227 | --------------------------------------------------------------------------------