Git Product home page Git Product logo

copytabtitleurl's Introduction

CopyTabTitleUrl

This is a browser extension in WebExtensions.
You can install it from the following site.

CopyTabTitleUrl – Add-ons for Firefox
https://addons.mozilla.org/firefox/addon/copytabtitleurl/

CopyTabTitleUrl - Chrome Web Store
https://chrome.google.com/webstore/detail/copytabtitleurl/lmgbdjfoaihhgdphombpgjpaohjfeapp

Features

You can customize the extension from setting options.

You can perform actions the following.

  • Copy the title and URL
  • Copy the title
  • Copy the URL
  • Copy the format (Example: Markdown, Hyperlink, etc)

You can perform actions on the following tabs.

  • Current tab
  • Multiple selected tabs
  • Current window tabs
  • All tabs

You can perform actions from the following operations.

  • Browser action (popup, click)
  • Context menu (all, page, browser action, tab)
  • Keyboard shortcut

You can perform actions in combination with the following functions.

  • Decode the URL
  • Decode the Punycode

Options

You can customize the extension by changing the extension settings from the Options page.

Please refer to following URL for details on options.
see https://github.com/k08045kk/CopyTabTitleUrl/wiki/Options

License

MIT

Author

toshi

copytabtitleurl's People

Contributors

k08045kk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

copytabtitleurl's Issues

title

Возможно сделать, чтобы {title} копировал из meta property="og:title"?

<title></title> часто добавляют в конец название сайта

ソースコード表示画面のURLが正常に取得できないことがある

成功例:view-source:https://example.com/
失敗例:view-source://https://example.com/

備考

  • URLのデコード or ピュニコードのデコードが有効な場合発生する
  • ピュニコード変換が有効でもピュニコード変換しない
  • ${href}, ${origin}, ${protocol}を含む場合も発生する
    • new URL()関連の問題と思われる
    • Firefox/Chromeで同様の動作となる
  • 挙動の差異については要調査対象
  • 重要度はさほど高くないものと考える
    • ソースコード表示画面のURLを取得したいと考えるユーザーは限定的だと考えられるため
  • Firefoxの「about:xxx」でも発生する
    • about://xxx

フォーマットの設定数を増やす

5枠分のフォーマットを使用したいとの要望あり。
コンテキストメニューのフォーマット枠の拡張が主目的。

備考

  • ショートカットは、動的追加不可(事前の最大数指定が必要)
  • ブラウザアクションは、縦に長くしすぎてはいけない
  • 個別にオプション設定が必要なのか要検討
  • ストレージ内のデータ形式を要検討
    • #8 のコンテキストメニュータイトル編集と合わせて検討する

New format ${selectedText}

${selectedText}: selected text or blank text.
${selectedText}: selected text or "undefined".

備考

  • #40
  • ${text}, ${linkSelectionTitle}, ${selectionLinkTitle}
  • ${favIconUrl}
    • blank text or "undefined"
  • 選択コンテキストメニューから使用可能

複数フォーマットのサポート

現状

「タブのフォーマットをコピー」の1つのフォーマットのみをサポートしている。

要求

「フォマット1」、「フォーマット2」のように複数フォーマットをサポートする。

考慮

  • 既存の機能と共存する必要があるか?(例:「タブのタイトルをコピー」と同時に利用するか?)
  • どこまで対応する必要があるか?(コンテキストメニュー、ポップアップメニュー、オプション画面)
  • どこまで対応する必要があるか?(カレントタブ、カレントウィンドウ、すべてのウィンドウ)
  • フォーマットの件数(2個、5個ぐらい、可変)
  • メニュー名称をどうするか?(固定名称「フォーマット1」、編集可能)
  • 個別のオプション設定(例:HTMLコピー有無を個別に指定する)
  • どの程度需要があるのか?

FR: Marked page text accessible in the Format command e.g. ${marked} keyword

Thanks for this great extension! One thing I'd love to have there is the ability to access marked text on the page, through an extra new keyword e.g. ${marked}. That way, format command could also specify to copy marked text from the page as plain text into the clipboard. That'd be very convenient - no extra mark, copy, and paste needed!

Format example: ${title}${enter}${url}${enter}Excerpt:${marked}

Thanks in advance.

Kiwi Browser のオプション画面でテキストフィールドに問題がある

kiwibrowser/src - GitHub

オプション画面でテキストフィールド(コンテキストメニューの項目名とフォーマット)を変更しようとすると動作が怪しくなる。

「コード上そこまで複雑なことをしていない」「ChromeやFirefoxで正常動作している」ことからKiwi Browser側の問題だと考えられる。標準のオプション画面のテキストフィールドに問題があるものと考える。

要調査項目。

【新機能案】「複数のタブを空白行で区切る」オプションを追加する

「複数のタブを空白行で区切る」は、「複数のタブを改行文字で区切る」が有効な場合のみ選択できる。

「複数のタブを改行文字で区切る」が無効の場合、タブを区切らない。
「複数のタブを改行文字で区切る」は、タブを改行1つで区切る。
「複数のタブを空白行で区切る」は、タブを改行2つで区切る。

参考:#44

Custom Format - remove string from tab title AND copy part of string from URL

image

.

Hi toshi, can you help me with this custom format, please :)

.

.

  • What I Want to Do :

.

1. Copy Tab title : Countdowns by ScorpVFX on Envato Elements

2. Remove "on Envato Elements" from tab title = Countdowns by ScorpVFX

.

3. Copy 'last portion' of URL after last hyphen : DZ783Q9

4. Add result from step 2 + step 3

.

Final Result : Countdowns by ScorpVFX DZ783Q9

ウィンドウのコピーができないことがある

「title (window tabs)」のコンテキストメニューからコピーすると別のウィンドウのタブタイトル一覧を取得する

再現手順

  • 「title (window tabs)」のコンテキストメニューを有効にする
  • Firefoxを再起動する
  • 「title (window tabs)」のコンテキストメニューからコピーする
    • 問題は発生しない
  • オプション画面からコンテキストメニューに関わる設定を変更する
    • コンテキストメニューを再生成する
  • 「title (window tabs)」のコンテキストメニューからコピーする
    • 問題が発生する

問題の推測

  • 次の処理まわりの問題だと思われる
  • chrome.tabs.query({currentWindow:true})
  • chrome.contextMenus

備考

  • 拡張機能の問題なのか、Firefox側の問題なのか切り分けが必要
  • 回避策:Firefoxを再起動する
    • 簡易に回避策を実施できるため、それほど重大な問題ではない
  • ブラウザアクションでは再現しない
  • ショートカットはウィンドウに対して動作しないため、影響なし
  • Chrome/Edgeでは再現しない
  • v2.0.2で再現する
  • v1.5.7でも再現する
  • 現在最新 Firefox83.0b3でも再現を確認済み
  • 「title」(複数の選択タブ含む)「title (all tabs)」では再現しない

タイトルなどにフォーマット用の書式が含まれると意図したコピー結果とならない

title = ${yyyy}について
format = ${title}
出力 => 2020について
想定 => ${yyyy}について

備考

  • ${title}, ${markdown}, ${text}, ${linkText}で発生する
  • ${url}系では発生しない(URLの書式上フォーマットの書式が出現しないため)
    • URLデコードあり時は、${url}系でも発生する
  • フォーマットの書式が通常の文字列として出現する可能性は十分に低いため、緊急度はそこまで高くないものと考える

コンテンツスクリプト対応の検討

「全ウェブサイトのユーザーデータへのアクセス」権限を取得しないことは、本拡張機能の良い特徴の一つだと考えます。そのため、コンテンツスクリプトに対応する予定はありません。ですが、コンテンツスクリプト対応によって実現できる機能について考慮しておくことは重要です。

もしも、有用な機能が実現できるのであれば、インストール後の権限追加などの方法を利用して機能追加することも検討します。(ただし、相当な理由がない限りは、機能追加しません)

また、hostパーミッションではなく、activeTabパーミッションのみを取得する方法も考えられます。

コンテンツスクリプトに対応した場合、次の機能が実現できる。

  • 正規URLのコピー
    • <link rel="canonical">
  • 説明のコピー
    • <meta name="description">
  • OGP情報のコピー
  • 他meta情報のコピー
  • ページ内のリンク取得
  • 選択文字列(window.getSelection().toString();
  • プロンプトによるユーザ入力
    • window.prompt(text, value)
  • ジェスチャ操作によるアクションの開始
    • マウス関連のイベントからコピーを開始する
    • ジェスチャ系の拡張機能で実現することができる(本拡張機能の対象外の機能?)
    • activeTab 権限では実現不可と判断する

通知機能対応

コピー完了時に通知機能で通知する。

備考

  • chrome.notificationsで対応する
  • chrome.permissionsでインストール後に権限を要求する
  • 現状、時期未定のまま対応しない(需要があれば追加する)

Menu entry missing

Today on two computers I checked, the menu option is no longer present. I reinstalled the add-on but this didn't help.

Both running Ubuntu 18.04 with latest FireFox.

デフォルト機能で text/html のコピー機能を無効にする

title & url, title, url で text/html のコピーを無効にする。
(title & url, title, url を以降ではデフォルト機能として記載します)

複数のタブをコピーした場合、コピーしたテキストは改行なしの一列の文字列として表示されます。
デフォルト機能は、text/html である可能性が極めて低いため、text/html コピーの機能からデフォルト機能を除外する必要があるものと考えます。また、text/html コピーを format に限定してもユーザーが戸惑うことは少ないものと考えます。

参照 #49

Feature Request: Keyboard Shortcut

I used to use this, but it is no longer supported.

In Chrome I was using this, and I generally thought it was perfect because I could customize the way the link was copied, and set a keyboard shortcut:

Anyway, great job with this addon. Small request.

Can you build in the functionality to set a keyboard shortcut to copy (Command + Shift + C is what I use in Chrome)? And let me define which option that uses to copy?

Thanks!

複数の選択したタブのサポート(Firefox only)

複数の選択したタブからタイトルとURLをコピーする。

覚書

  • tabs.query({highlighted: true})
  • UI
    • 単体のタブコピーを拡張するか、新設するか
    • タブコンテキストメニュー時の挙動
      • 現在はクリックしたタブで動作する(クリックしたタブが選択されていない可能性がある)
    • 対象範囲は、全ウィンドウ or カレントウィンドウ

[新機能案] 翻訳済みページでコピーした時、翻訳前のタイトルでコピーする

翻訳機能を使用した場合、翻訳後にコピーすると翻訳済みタイトルを取得してしまいます。なので、翻訳前のタイトルを取得するオプション機能を提供する。

備考

  • 実現可能なのか要検討
  • 現状では、<head><title>の内容をコピーしている
    • 正確には、chrome.tabs.Tab.titleの内容をコピーしている
    • 翻訳機能によって上記の内容が変更されるとコピー内容が翻訳される
    • そのため、この機能を使用する場合、タイトルを変更するページで悪影響が発生することが考えられる

Manage Extension Shortcuts でショートカットを変更した場合、オプション画面の表示が追従しない

Manage Extension Shortcuts
https://support.mozilla.org/en-US/kb/manage-extension-shortcuts-firefox

Manage Extension Shortcuts(Firefoxのショートカット変更画面)でショートカットを変更した場合、ショートカットは、変更されるが、オプション画面の表示が追従しない。また、Firefoxの再起動や拡張機能の再起動後にショートカット設定を元々の設定に戻される。

ショートカットをstorageではなく、commands側で制御するように修正予定。

備考

  • Manage Extension Shortcuts の考慮漏れ
  • Firefox限定

Firefox - copy from context menu does not work

Hello,

In added CopyTabTitleUrl extension to both Chromium (version 1.5.2) and Firefox (version 1.5.3) and I use the same settings- screens:

Chromium:
CopyTabTitleUrl 1 5 2 - Chromium - 2019-05-25 - 002

Firefox:
CopyTabTitleUrl 1 5 3 - Firefox - 2019-05-25 - 002

and 'copy from context menu' works in Chromium while it does not work in Firefox. In Firefox I tried to copy both from tab context menu and from page context menu and both copy actions failed. What settings I am supposed to use in Firefox to be able to copy from context menu?

Regards

アイコンがない

拡張機能のアイコンが不足している。

既存の挙動

  • Firefoxでは、パズルピースのアイコンを表示する。
  • Chromeでは、「c」のアイコンを表示する。

望む結果

拡張機能にふさわしいアイコンを表示すべきである。

[提案] フォーマットのwindow.URLプロパティの追加

フォーマットへのhash, host, hostname, href, origin, password, pathname, port, protocol, search, usernameの追加

[補足]
https://developer.mozilla.org/ja/docs/Web/API/URL
現在のフォーマットとの重複はない。
結果として、hrerurlは内容が重複する。
存在しない場合、'""'(空文字)とする。
Chrome/Firefoxの対応は、十分に古い(最悪未対応時、は動作しない設計とする)

multiple tabs not separated

I enabled "Separate multiple tabs with a newline character", but the tabs are not separated.
Using version 2.2.0

ブラウザアクションコンテキストメニュー

ブラウザアクションコンテキストメニュー対応

現状では、「コンテキストメニュー」を設定した場合のみブラウザアクションコンテキストメニューに追加される。「コンテキストメニュー」では、他の不要なコンテキストメニューを表示してしまうため、ブラウザアクション限定で表示する機能を追加する。

How to add the Current DATE before the copied TITLE and URL?

Easy, very useful Chrome addon.
Thank you!

Q:
how do I add the Current DATE
before the copied TITLE and URL.

I tried
in the "format" options field:

${yyyy}-${MM}-${dd})-[${title}](${url})

(but my format syntax must be wrong...).

Help!
sfd99
San Francisco
latest Chrome browser
Ubuntu LINUX 20.04

他拡張機能によって非表示になったタブを除外する

tabHide権限で他拡張機能が非表示としたタブをコピー対象から除外するオプションを新設する。
主に下記のAPIが関与している。

  • tabs.hide()
  • tabs.show()
  • tabs.query()
  • tabs.Tab.hidden

試行錯誤

tabs.Tab.hidden==falseを除外しても、一部のタブが除外しきれない問題が発生する。

環境準備例

PanoramaView
https://addons.mozilla.org/en-US/firefox/addon/panorama-view/
Tree Tabs
https://addons.mozilla.org/ja/firefox/addon/tree-tabs/

  • Option
    • Groups
      • Show Firefox tabs from current group only.

備考

  • 複数選択タブで表示中のタブのみコピーすることが可能

コピーするタブがない場合の動作について

「Exclude pinned tabs」機能によってコピーするタブが1つもない場合、どのように動作するべきか?
(他機能の影響で同様の現象となった場合も同様)

  1. ””(空文字)をコピーする ← 現在の動作
  2. コピー対象がないことを伝えるメッセージをコピーする
  3. カレントタブをコピーする

1.は、異常動作と区別がつかないため、採用したくない。
2.は、出力する文字列をどうするか(言語とか)考えると難しい。
3.は、誤動作と間違えられる可能性がある。(コピー対象なしがそもそもの問題ではある)
3.の方向で調整する。(明確な理由があれば、仕様変更する可能性あり)

クリップボードAPI対応

クリップボードコピー方法を選択可能とする。

  • navigator.clipboard.write()
  • document.execCommand('copy')

備考

format1 ${text} does not use selection when called by keyboard shortcut

Hello.
Thank you for the extension. It looks very interesting.

Meantime it looks like there bug present.

I've try configure that to copy page link with selection by a keyboard shortcut:
image

But that work as expected from the selection context menu (mouse click), but when I invoke that by keyboard shortcut (Alt + L in my example) ${text} always resolved into the page title, instead of selected text!

Feature Request : Copy Tab and/or Title of Selected URLs

Feature Request : Copy Tab and/or Title of Selected URLs

Can you implement the ability to select a group of links and either open selected links or copy selected links? Additionally, when one selects links, can you add a submenu to copy title and/or links and copy links as a list or one continuous line?

Thanks in advance!

[新機能案] フォーマット用の置換処理の追加

${url}, ${title}を置換する機能を追加する。

類似の問題(#14

備考

  • フォーマットに直接関数風に追加する?
    • ${url.replace(/^http:/, "https:")}
  • ドメイン・URL毎に個別に指定する?
    • フォーマット本体への変更はなし
    • www.amazon.co.jp, ${url}, (https?://www.amazon.co.jp)/[^/].*(/dp/.*/).*, "$1$2"

依頼

この機能を使用する予定がある方は、使用意図と使用方法をコメントして下さい。実装とテストの参考にします。

Amazonで商品ページの不要な文字列を削除する。

url.replace(/^(https://www.amazon.co.jp)/[^/].*(/dp/\d+).*/, '$1$2');
url.replace(new RegExp("^(https:\/\/www\.amazon\.co\.jp)\/[^/].*(\/dp\/\d+).*$", "g"), '$1$2');

https://www.amazon.co.jp/まぐれ―投資家はなぜ、運を実力と勘違いするのか-ナシーム・ニコラス・タレブ/dp/4478001227
↓ 置換例
https://www.amazon.co.jp/dp/4478001227

キーボードショートカットのショートカット数の増加について

キーボードショートカットを増やすことは可能です。

コンテキストメニューの最大フォーマット指定数と同じだけショートカット数を増加させることは難しくなくすぐにでも対応できます。ただし、現状では対応していません。

ショートカット数は、拡張脳が動的に増加させることはできません。静的に事前指定した個数のみ登録できます。ショートカットの設定は、ブラウザ標準のショートカット変更画面で行います。ショートカット画面に9個の使用しない項目が表示されることを私は好ましく思っていません。なので、この機能は実装されていません。

もしも、2つ以上のキーボードショートカットを使用する理由があり、それが十分に一般的であるならば、教えてください。その理由に納得できれば、この機能を追加します。それまで、この機能は未実装のままです。

[新機能案] ページアクション対応

ページアクションに対応する。

検討事項

  • 表示内容は、ブラウザアクションと同様でよいか?
    • ポップアップ or クリック
  • ページアクションを使用しない場合の動作はどうなるのか?

Manifest V3対応

FirefoxのManifestV3対応に合わせてManifestV3対応を予定する。
内部設計・ロゴアイコン・各種設定の再検討も合わせて実施する。

ブラウザ対応状況

参考資料

検討事項

  • パーミッションのactiveTabを有効とするか?
    • 必須ではないが、activeTab有効が自然と判断するため、無効→有効に変更予定
  • manifest.homepage_url = 'https://github.com/k08045kk/CopyTabTitleUrl';
  • クリップボードAPIの再検討
    • HTMLコピー絡みの問題を再考する
    • できる限り、最新のコードへ移行したい
  • 最悪の場合、既存のユーザ設定を削除して初期設定に戻す
    • 最悪の場合に限る
  • 翻訳の見直し
  • commons.js の公開と非公開の関数を分離
  • async/await で書き直し

activeTab 権限を取得する(コンテンツスクリプトを一部解禁する)

次期バージョンで試験的に activeTab 権限を使用する機能を提供する。
取得するのは、「activeTab」であり、「<all_urls>」ではない。

コンテンツスクリプトの問題について度々質問を受け付けるため、試験的に導入する。(関連:#17, #38, #40, #41, #42
権限増加になんらかの懸念がある場合、コメントしてください。試験中止を含めて再検討します。(新規機能案は、別の問題としてください)

懸念事項等

  • インストール時・更新時の権限昇格ダイアログ有無
    • ない予定
  • AMO・ChromeStoreの許可設定の項目
    • 増加なし予定
  • コンテンツスクリプトの実行完了を待機するため、コピーまでの時間が遅延する
  • トップウィンドウのみで良いか?
    • フレームでの実行が必要か?
  • 主な対象範囲
    • アクティブタブ(ウィンドウのタブ、すべてのタブは対象外)
    • コンテキストメニュー、ブラウザアクション、キーボードショートカット(対象外はなし)
  • タブコンテキストメニューで非アクティブタブを選択するパターンを要検討
    • 動作する?
  • どの機能に対応する?
    • 下位互換等を考慮すると、大量の新機能とその廃止は、あまり好ましくない
    • 必要最低限の機能のみとしたい
    • 要望があり、実現可能だとしても、機能追加するとは限らない(機能追加しない可能性が高い)
  • ショートカット時の${text}の動作(互換性の問題)
    • 現在の動作は、${title}と同じ
    • window.getSelection().toString();に変更する?(選択なし時は、既存動作)
    • 関連:#40, #41
  • ${og:site_name} 等、存在が確約できないデータの取得失敗時の動作
    • 空文字とする
      • ${title} | ${og:site_name} で取得失敗時に前方の「|」を削除したい
        • 従属する付加文字の扱いについて要検討
    • そのまま残す
      • エラー時と区別ができない

How to add the Current DATE before TITLE and URL?

Easy,
very useful Chrome addon.
Thank you!

Q:
how do I add the Current DATE
before the copied TITLE and URL ?.

I tried
in the "format" options field:

${yyyy}-${MM}-${dd})-[${title}](${url})

but my format syntax must be wrong.

The TITLE and URL are copied to clipboard OK,
but the DATE does not appear...
only the date "special format $ characters" show up
like this, after pasting:
${yyyy}-${MM}-${dd})

Help!
sfd99
San Francisco
latest Chrome browser
Ubuntu LINUX 20.04

${title}の各種エスケープ処理

各種リンク文字列で使用不可の文字や文字の置き換えが必要な場合がある。ただし、すべてのリンク書式に対応するのは現実的ではない。ユーザ入力で対応する場合、フォーマット書式とセキュリティについて要検討。


${title} = タイトル]
${url} = URL
[${title}](${url}) => [タイトル]](URL)

補足

  • 「空文字への置換」「以降の文字列の削除」対応方法も複数考えられる
  • 時期未定のまま対応しない可能性が高い

Possible to copy/paste URL with embedded hyperlink?

Hi,

I'd appreciate your help:

(1) By using CopyTabTitleUrl command 'URL', a plain text link appears in my clipboard, and when pasted in Word the URL is shown as like illustrated in the screenshot below.

(2) However, if copy the URL directly from the browser address bar, and paste it into Word, the link appears with the page title having the URL as an embedded hyperlink?

Is it possible to set CopyTabTitleUrl to copy/paste URL with embedded hyperlink, like described in (2)?

Thank you!

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.