Giter VIP home page Giter VIP logo

tab-transporter's Introduction

Tab Transporter Scripts

Tab Transporter moves tabs in bulk across broswers on macOS

More precisely, it moves tabs from the frontmost window of <source browser> to <destination browser>, where the supported browsers are:


I developed Tab Transporter out of personal utility because I couldn't find anything else that did exactly what I wanted.

Tab Transporter supports moving tabs across browsers like so (tt_<source>_to_<destination>.applescript):

Browsers:

Source Destination Support
Chrome Safari โœ…
Brave โœ…
Safari Chrome โœ…
Brave โœ…
Edge * ๐Ÿ”œ
Firefox * ๐Ÿ”œ
Opera * ๐Ÿ”œ
Brave Chrome โœ…
Safari โœ…
Arc * ๐Ÿ›‘
Sidekick * ๐Ÿ”œ
Vivaldi * ๐Ÿ”œ

Note: Browsers are ordered by usage share according to Wikipedia

Key:

Symbol Meaning Notes
โœ… Yes This browser is supported
โŒ No This browser is not supported
๐Ÿ›‘ Blocked Implementation blocked (this browser uses a waitlist)
๐Ÿ”œ Todo To be implemented

Use Case

  • I've opened a bunch of tabs in Safari (such as new apps to check out), but I need to get them out of the way for now to focus on work
  • OneTab handles this in Chrome, but it doesn't exist for Safari
  • I desire to stash all of these tabs in one centralized location

Installation

This is an example for the Safari to Chrome version. There's also a Chrome to Safari version included, and there will probably be additional browser support in the future.

  • In the AppleScript folder, open one of the tt_*.applescript files in Script Editor.app (we'll start with tt_safari_to_chrome.applescript)
  • File > Export...
    • Export As: Tab Transporter - Safari to Chrome.app
    • Where: Applications
    • File Format: Application
    • Options:
      • (none checked)
    • Code Sign: Don't Code Sign

For other browsers, repeat the above instructions changing the source and destination browser names when choosing the script file to open and exporting it as an app.

Usage

  • Launch it when you want to move tabs (I type tt in Alfred, but Spotlight works just as well)

Alternatives

This section covers possible solutions that didn't work for me, which led me to create Tab Transporter.

Dr. Drang wrote a similar survey of the same problem in October 2012 in Saving browser tab sets.

  • Pinboard Tab Sets
  • Safari
    • Add Bookmarks for These n Tabs - doesn't integrate with Chrome tabs
    • Add These n Tabs to Reading List - doesn't sync with OneTab in Chrome, Pocket, etc.
    • Develop > Open Page With > Google Chrome - moves only one tab at a time
      • If you don't have this menu item, ensure this is checked: Preferences > Advanced > Show Develop menu in menu bar
  • Switch
    • Has cross-browser sync, but... handles only one page at a time, and consumes precious menu bar real estate
    • No longer maintained

Misc

Tested on Mac OS X 12.6.3. Other recent will most likely work, but have not been tested by me personally.

tab-transporter's People

Contributors

tedmiston avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

tab-transporter's Issues

Add HTML browser matrix (WIP)

This is harder to read than the current markdown table, but it paints a more complete picture as support for more browsers are added.

I am using Tables Generator as an editor for this. To import the table for editing: File > Paste table data..., paste the code below, check "Paste with formatting", then click "Load".

Note: There are some issues with its HTML output, like lack of support for multiple levels of table headers, so this is a WIP start of a complete solution.

Browser Matrix

todo: make browser columns an equal fixed width

todo: explore if transposing source vs destination is more intuitive

Code:

<style type="text/css">
.tg  {border-collapse:collapse;border-spacing:0;}
.tg td{border-color:black;border-style:solid;border-width:1px;font-family:Arial, sans-serif;font-size:14px;
  overflow:hidden;padding:10px 5px;word-break:normal;}
.tg th{border-color:black;border-style:solid;border-width:1px;font-family:Arial, sans-serif;font-size:14px;
  font-weight:normal;overflow:hidden;padding:10px 5px;word-break:normal;}
.tg .tg-9wq8{border-color:inherit;text-align:center;vertical-align:middle}
.tg .tg-baqh{text-align:center;vertical-align:top}
.tg .tg-0lax{text-align:left;vertical-align:top}
.tg .tg-5frq{font-style:italic;text-align:center;vertical-align:top}
.tg .tg-0pky{border-color:inherit;text-align:left;vertical-align:top}
.tg .tg-7btt{border-color:inherit;font-weight:bold;text-align:center;vertical-align:top}
.tg .tg-xxp7{font-style:italic;font-weight:bold;text-align:center;vertical-align:middle}
.tg .tg-g7sd{border-color:inherit;font-weight:bold;text-align:left;vertical-align:middle}
</style>
<table class="tg">
<thead>
  <tr>
    <th class="tg-baqh"></th>
    <th class="tg-0lax"></th>
    <th class="tg-5frq" colspan="9"><span style="font-weight:bold">Source Browser</span></th>
  </tr>
</thead>
<tbody>
  <tr>
    <td class="tg-baqh"></td>
    <td class="tg-0pky"></td>
    <td class="tg-7btt">Chrome</td>
    <td class="tg-7btt">Safari</td>
    <td class="tg-7btt">Edge</td>
    <td class="tg-7btt">Firefox</td>
    <td class="tg-7btt">Opera</td>
    <td class="tg-7btt">Brave</td>
    <td class="tg-7btt">Arc</td>
    <td class="tg-7btt">Sidekick</td>
    <td class="tg-7btt">Vivaldi</td>
  </tr>
  <tr>
    <td class="tg-xxp7" rowspan="9">Destination<br>Browser</td>
    <td class="tg-g7sd">Chrome</td>
    <td class="tg-9wq8">โฌœ๏ธ</td>
    <td class="tg-9wq8">๐ŸŸฉ</td>
    <td class="tg-9wq8">๐ŸŸจ</td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">๐ŸŸจ</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">๐ŸŸจ</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">๐ŸŸฉ</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">โฌ›๏ธ</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">๐ŸŸช</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">๐ŸŸฅ</span></td>
  </tr>
  <tr>
    <td class="tg-g7sd">Safari</td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">๐ŸŸฉ</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">โฌœ๏ธ</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">๐ŸŸจ</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">๐ŸŸจ</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">๐ŸŸจ</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">๐ŸŸฉ</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">โฌ›๏ธ</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">๐ŸŸช</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">๐ŸŸฅ</span></td>
  </tr>
  <tr>
    <td class="tg-g7sd">Edge</td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">๐ŸŸจ</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">๐ŸŸจ</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">โฌœ๏ธ</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">๐ŸŸจ</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">๐ŸŸจ</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">๐ŸŸจ</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">โฌ›๏ธ</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">๐ŸŸช</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">๐ŸŸฅ</span></td>
  </tr>
  <tr>
    <td class="tg-g7sd">Firefox</td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">๐ŸŸจ</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">๐ŸŸจ</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">๐ŸŸจ</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">โฌœ๏ธ</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">๐ŸŸจ</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">๐ŸŸจ</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">โฌ›๏ธ</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">๐ŸŸช</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">๐ŸŸฅ</span></td>
  </tr>
  <tr>
    <td class="tg-g7sd">Opera</td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">๐ŸŸจ</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">๐ŸŸจ</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">๐ŸŸจ</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">๐ŸŸจ</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">โฌœ๏ธ</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">๐ŸŸจ</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">โฌ›๏ธ</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">๐ŸŸช</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">๐ŸŸฅ</span></td>
  </tr>
  <tr>
    <td class="tg-g7sd">Brave</td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">๐ŸŸฉ</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">๐ŸŸฉ</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">๐ŸŸจ</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">๐ŸŸจ</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">๐ŸŸจ</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">โฌœ๏ธ</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">โฌ›๏ธ</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">๐ŸŸช</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">๐ŸŸฅ</span></td>
  </tr>
  <tr>
    <td class="tg-g7sd">Arc</td>
    <td class="tg-9wq8">โฌ›๏ธ</td>
    <td class="tg-9wq8">โฌ›๏ธ</td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">โฌ›๏ธ</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">โฌ›๏ธ</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">โฌ›๏ธ</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">โฌ›๏ธ</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">โฌœ๏ธ</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">โฌ›๏ธ</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">โฌ›๏ธ</span></td>
  </tr>
  <tr>
    <td class="tg-g7sd">Sidekick</td>
    <td class="tg-9wq8">๐ŸŸช</td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">๐ŸŸช</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">๐ŸŸช</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">๐ŸŸช</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">๐ŸŸช</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">๐ŸŸช</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">โฌ›๏ธ</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">โฌœ๏ธ</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">๐ŸŸฅ</span></td>
  </tr>
  <tr>
    <td class="tg-g7sd">Vivaldi</td>
    <td class="tg-9wq8">๐ŸŸฅ</td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">๐ŸŸฅ</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">๐ŸŸฅ</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">๐ŸŸฅ</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">๐ŸŸฅ</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">๐ŸŸฅ</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">โฌ›๏ธ</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">๐ŸŸฅ</span></td>
    <td class="tg-9wq8"><span style="font-weight:400;font-style:normal">โฌœ๏ธ</span></td>
  </tr>
</tbody>
</table>

Preview:

Legend

Code:

Color Meaning Notes
โฌœ๏ธ N/A
๐ŸŸฉ Supported Already developed
๐ŸŸจ Planned Planned for development in backlog
โฌ›๏ธ Blocked Blocked from development (e.g., browser is waitlisted)
๐ŸŸช Backburner Planned for development in icebox
๐ŸŸฅ Unsupported Not supported due to technical constraint

Fails if Safari is in full screen mode

If Safari is in full screen mode running it gives:

Can't get class pURL of application "Safari".

This seems to occur whether Safari is the frontmost app or not.

Bringing the window out of full screen mode, then running is a fix for the time being.

Support "History > Reopen Last Closed Window" in Safari

There was support for this with the previous approach to closing tabs:

tell application "Safari"
    activate
    tell application "System Events"
        keystroke "w" using {command down, shift down}
    end tell
end tell

vs current approach:

on closeTabs(sourceWindow)
    using terms from application "Safari"
        tell application sourceBrowser to close sourceWindow
    end using terms from
end closeTabs

But at the tradeoff of being uglier and less robust. Something to keep in mind for now.

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.