Skip to content

Commit

Permalink
Meta tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed May 18, 2020
1 parent c4d6e3e commit 71fef2e
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 14 deletions.
3 changes: 1 addition & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
* text=auto
*.js text eol=lf
* text=auto eol=lf
10 changes: 5 additions & 5 deletions background.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
'use strict';

const p = (fn, ...args) => new Promise(resolve => fn(...args, resolve));
const promisify = (fn, ...args) => new Promise(resolve => fn(...args, resolve));

chrome.browserAction.onClicked.addListener(async () => {
let [currentWindow, ...tabs] = await Promise.all([
p(chrome.windows.getCurrent),
p(chrome.tabs.query, {
promisify(chrome.windows.getCurrent),
promisify(chrome.tabs.query, {
currentWindow: false,
windowType: 'normal'
}),
p(chrome.tabs.query, {
promisify(chrome.tabs.query, {
currentWindow: false,
windowType: 'popup'
})
]);

tabs = Array.prototype.concat.apply([], tabs);

await p(chrome.tabs.move, tabs.map(tab => tab.id), {
await promisify(chrome.tabs.move, tabs.map(tab => tab.id), {
windowId: currentWindow.id,
index: -1
});
Expand Down
Binary file modified icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion license
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) Sindre Sorhus <[email protected]> (sindresorhus.com)
Copyright (c) Sindre Sorhus <[email protected]> (https://sindresorhus.com)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
Binary file modified promo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 0 additions & 6 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,4 @@
<img src="screenshot.png" width="400">


## [Install](https://chrome.google.com/webstore/detail/merge-windows/kbpinmnkhfkoidiinmapkhifnfoiklkb)


## License

MIT © [Sindre Sorhus](https://sindresorhus.com)
Binary file modified screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 71fef2e

Please sign in to comment.