Skip to content

Commit 90192bd

Browse files
committed
Version up v0.29.0.
Fixed video maximize function. Added a function to move the window by dragging the mouse when maximizing the movie. Added a function to set the size of 100% or more when maximizing the video. In addition, it was possible to move the position by mouse drag when it was over 100%. Fixed the pause function by clicking the video and set it to the default action. Fixed video page. Fixed video pop-up window. Bug fixes when changing the window size. Fixed bug when maximizing window. Changed the default bookmark page to Chrome standard. And add options to change. Fixed a bug that right-click menu does not work when extension is uninstalled. Fixed tab focus by mouse over. Fixed a bug in the location bar. Updated Electron to v6.1.5. Updated Custom Chromium to 78.0.3904.108. Updated Custom Brave to 1.0.1. Updated youtube-dl to 2019.11.22.
1 parent 3ec388b commit 90192bd

File tree

12 files changed

+71
-94
lines changed

12 files changed

+71
-94
lines changed

README.md

Lines changed: 19 additions & 1 deletion
Large diffs are not rendered by default.

VERSION.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.28.1
1+
0.29.0

ja/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -202,14 +202,14 @@ Puppeteer(ヘッドレスChromeでの自動化) APIと互換性のあるAPIを
202202

203203
各プラットフォームに対し、インストーラとポータブル版の両方がダウンロードできます。
204204

205-
- [Windows Installer v0.28.1](https://github.com/kura52/sushi-browser/releases/download/0.28.1/sushi-browser-0.28.1-setup-x64.exe)
206-
- [Windows Portable v0.28.1(Chromium同梱)](https://github.com/kura52/sushi-browser/releases/download/0.28.1/sushi-browser-0.28.1-win-x64-chromium.zip)
207-
- [Windows Portable v0.28.1(Brave同梱)](https://github.com/kura52/sushi-browser/releases/download/0.28.1/sushi-browser-0.28.1-win-x64-brave.zip)
208-
- [Windows Portable v0.28.1](https://github.com/kura52/sushi-browser/releases/download/0.28.1/sushi-browser-0.28.1-win-x64.zip)
205+
- [Windows Installer v0.29.0](https://github.com/kura52/sushi-browser/releases/download/0.29.0/sushi-browser-0.29.0-setup-x64.exe)
206+
- [Windows Portable v0.29.0(Chromium同梱)](https://github.com/kura52/sushi-browser/releases/download/0.29.0/sushi-browser-0.29.0-win-x64-chromium.zip)
207+
- [Windows Portable v0.29.0(Brave同梱)](https://github.com/kura52/sushi-browser/releases/download/0.29.0/sushi-browser-0.29.0-win-x64-brave.zip)
208+
- [Windows Portable v0.29.0](https://github.com/kura52/sushi-browser/releases/download/0.29.0/sushi-browser-0.29.0-win-x64.zip)
209209
- [MacOS dmg v0.27.0](https://github.com/kura52/sushi-browser/releases/download/0.27.0/SushiBrowser-0.27.0.dmg)
210210
- [MacOS Portable v0.27.0](https://github.com/kura52/sushi-browser/releases/download/0.27.0/sushi-browser-0.27.0-mac-x64.zip)
211-
- [Linux rpm (for Fedora/CentOS) v0.28.1](https://github.com/kura52/sushi-browser/releases/download/0.28.1/sushi-browser-0.28.1-1.x86_64.rpm)
212-
- [Linux deb (for Debian/Ubuntu) v0.28.1](https://github.com/kura52/sushi-browser/releases/download/0.28.1/sushi-browser_0.28.1_amd64.deb)
213-
- [Linux Portable v0.28.1](https://github.com/kura52/sushi-browser/releases/download/0.28.1/sushi-browser-0.28.1.tar.bz2)
211+
- [Linux rpm (for Fedora/CentOS) v0.29.0](https://github.com/kura52/sushi-browser/releases/download/0.29.0/sushi-browser-0.29.0-1.x86_64.rpm)
212+
- [Linux deb (for Debian/Ubuntu) v0.29.0](https://github.com/kura52/sushi-browser/releases/download/0.29.0/sushi-browser_0.29.0_amd64.deb)
213+
- [Linux Portable v0.29.0](https://github.com/kura52/sushi-browser/releases/download/0.29.0/sushi-browser-0.29.0.tar.bz2)
214214

215215
ポータブル版の利用は、解凍後にWindowsはsushi.exeを、Mac/Linuxはsushi-browserを実行ください。

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sushi-browser",
3-
"version": "0.28.1",
3+
"version": "0.29.0",
44
"description": "Sushi Browser",
55
"main": "./lib/main.js",
66
"author": "kura52",

src/defaultExtension/contentscript.js

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -245,19 +245,24 @@ if(window.__started_){
245245

246246
const resizeEvent = (v) => {
247247

248-
let y, x
248+
let x, y
249249
const mmove = e => {
250250
clickEventCancel = true
251-
const moveX = e.pageX - x
252-
x = e.pageX
253-
const moveY = e.pageY - y
254-
y = e.pageY
255-
256-
const xVal = parseInt(v.style.left) + moveX * 3
257-
const yVal = parseInt(v.style.top) + moveY * 3
258251

259-
v.style.setProperty('left', `${xVal}px`,'important')
260-
v.style.setProperty('top', `${yVal}px`,'important')
252+
if(parseInt(v.style.width) != 100){
253+
const moveX = e.pageX - x
254+
x = e.pageX
255+
const moveY = e.pageY - y
256+
y = e.pageY
257+
const xVal = parseInt(v.style.left) + moveX * 3
258+
const yVal = parseInt(v.style.top) + moveY * 3
259+
v.style.setProperty('left', `${xVal}px`,'important')
260+
v.style.setProperty('top', `${yVal}px`,'important')
261+
}
262+
else{
263+
console.log('move-window-from-webview', e.movementX, e.movementY)
264+
ipc.send('move-window-from-webview', e.movementX, e.movementY)
265+
}
261266
}
262267

263268
const mup = e => {
@@ -377,25 +382,19 @@ if(window.__started_){
377382
preVal = value
378383
if(percent != 100){
379384
span.firstChild.textContent = `Normal [${percent}%]`
380-
if(!ResizeEventMap.has(v)){
381-
ResizeEventMap.set(v, resizeEvent(v))
382-
}
383385
}
384386
else{
385387
span.firstChild.textContent = 'Normal'
386388
v.style.setProperty('left', '0','important')
387389
v.style.setProperty('top', '0','important')
388-
if(ResizeEventMap.has(v)){
389-
v.removeEventListener('mousedown', ResizeEventMap.get(v), false)
390-
v.removeEventListener('play', funcPlay)
391-
v.removeEventListener('pause', funcPause)
392-
ResizeEventMap.delete(v)
393-
}
394390
}
395391
}
396392
input.addEventListener('input', onInput)
397393
v.inputFunc = onInput
398394
span.appendChild(input)
395+
if(!ResizeEventMap.has(v)){
396+
ResizeEventMap.set(v, resizeEvent(v))
397+
}
399398
}
400399

401400
span.style.cssText = `${rStyle};z-index: 2147483647;position: absolute;overflow: hidden;border-radius: 8px;background: rgba(50,50,50,0.9);text-shadow: 0 0 2px rgba(0,0,0,.5);transition: opacity .1s cubic-bezier(0.0,0.0,0.2,1);margin: 0;border: 0;font-size: 14px;color: white;padding: 4px 7px;text-align: center;`;

src/ipcUtils.js

Lines changed: 8 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2485,6 +2485,14 @@ ipcMain.on('move-browser-view', async (e, panelKey, tabKey, type, tabId, x, y, w
24852485
}
24862486
})
24872487

2488+
ipcMain.on('move-window-from-webview', (e, moveX, moveY) => {
2489+
const tabId = e.sender.id
2490+
const [panelKey, tabKey, browserPanel, browserView] = BrowserPanel.getBrowserPanelByTabId(tabId)
2491+
const [x,y] = browserPanel.browserWindow.getPosition()
2492+
console.log(x, y, moveX, moveY)
2493+
browserPanel.browserWindow.setPosition(x + moveX, y + moveY)
2494+
})
2495+
24882496
const setBoundClearIds = {},dateCache = {}
24892497
ipcMain.on('set-bound-browser-view', async (e, panelKey, tabKey, tabId, x, y, width, height, zIndex, date=Date.now())=>{
24902498
if(dateCache[panelKey] && dateCache[panelKey] > date) return
@@ -2693,7 +2701,6 @@ ipcMain.on('set-overlap-component', async (e, type, panelKey, tabKey, x, y, widt
26932701
}
26942702
})
26952703

2696-
const parentState = {}
26972704
ipcMain.on('change-browser-view-z-index', (e, isFrame, panelKey, force) =>{
26982705
const win = BrowserWindow.fromWebContents(e.sender)
26992706
if(!win || win.isDestroyed()) return
@@ -2703,31 +2710,6 @@ ipcMain.on('change-browser-view-z-index', (e, isFrame, panelKey, force) =>{
27032710
if(force){
27042711
BrowserPanel.getBrowserPanelsFromBrowserWindow(win)[0].setAlwaysOnTop(!isFrame)
27052712
}
2706-
if(isWin){
2707-
if(isFrame){
2708-
if(parentState[win.id]) return
2709-
let lastPanel
2710-
parentState[win.id] = true
2711-
for(const panel of BrowserPanel.getBrowserPanelsFromBrowserWindow(win)){
2712-
console.log('setWindowLongPtrParentRestore')
2713-
panel.cpWin.chromeNativeWindow.setWindowLongPtrParentRestore()
2714-
panel.cpWin.chromeNativeWindow.setWindowPos(0, 0, 0, 0, 0, 19 + 1024)
2715-
lastPanel = panel
2716-
}
2717-
lastPanel.cpWin.nativeWindowBw.moveTop()
2718-
// setTimeout(()=>lastPanel.cpWin.nativeWindowBw.moveTop(),50)
2719-
}
2720-
else{
2721-
if(!parentState[win.id]) return
2722-
parentState[win.id] = false
2723-
for(const panel of BrowserPanel.getBrowserPanelsFromBrowserWindow(win)){
2724-
console.log('setWindowLongPtrParent')
2725-
panel.cpWin.chromeNativeWindow.setWindowLongPtrParent(panel.cpWin.nativeWindowBw.getHwnd())
2726-
panel.cpWin.chromeNativeWindow.setWindowPos(0, 0, 0, 0, 0, 19 + 1024)
2727-
}
2728-
}
2729-
return
2730-
}
27312713
if(isFrame){
27322714
ipcMain.emit('top-to-browser-window', win.id)
27332715
}

src/remoted-chrome/Browser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ Or, please use the Chromium bundled version.`
285285
browserPanel.browserWindow.focus()
286286
}
287287
else{
288-
browserPanel.cpWin.nativeWindowBw.moveTop()
288+
browserPanel.moveTopNativeWindowBw()
289289
}
290290
console.log('moveTopNativeWindowBW2',Date.now())
291291
return

src/remoted-chrome/BrowserPanel.js

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import DpiUtils from './DpiUtils'
44
import os from 'os'
55

66
const isWin7 = os.platform() == 'win32' && os.release().startsWith('6.1')
7-
const isWin = process.platform === 'win32'
87
const isLinux = process.platform === 'linux'
98
const isDarwin = process.platform === 'darwin'
109

@@ -531,17 +530,6 @@ export default class BrowserPanel {
531530
DpiUtils.move(chromeNativeWindow,...BrowserPanel.getChromeWindowBoundArray(0, 0))
532531
chromeNativeWindow.moveTop()
533532
}
534-
else{
535-
chromeNativeWindow.setWindowLongPtrParent(nativeWindowBw.getHwnd())
536-
// chromeNativeWindow.setParent(nativeWindowBw.getHwnd())
537-
// const hwnd = nativeWindowBw.createWindow()
538-
// const nativeWindow2 = (await winctl.FindWindows(win => win.getHwnd() == hwnd))[0]
539-
// nativeWindow2.moveRelative(0, 0, 2000, 2000)
540-
// setTimeout(()=>{
541-
// chromeNativeWindow.setParent(nativeWindow2.getHwnd())
542-
// nativeWindowBw.setParent(nativeWindow2.getHwnd())
543-
// },5000)
544-
}
545533

546534
// nativeWindowBw.setWindowLongPtrEx(0x02000000)
547535
nativeWindowBw.setWindowLongPtr(0x00040000)
@@ -696,7 +684,6 @@ export default class BrowserPanel {
696684
this.cpWin.nativeWindow.hidePanel ||
697685
!this.checkNeedMoveTop()) return
698686

699-
if(isWin) return
700687
console.log('moveTopNativeWindow()')
701688

702689
this.cpWin.nativeWindow.moveTop()
@@ -714,7 +701,6 @@ export default class BrowserPanel {
714701
if (BrowserPanel.contextMenuShowing || !this.checkNeedMoveTop()) return
715702
// const now = Date.now()
716703

717-
if(isWin) return
718704
console.log('moveTopNativeWindowBW()',this.browserWindow._alwaysOnTop)
719705

720706
// if(!this.moveTopCache || now - this.moveTopCache > 30){

src/remoted-chrome/webContents.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ let BrowserPanel = new Proxy({}, { get: function(target, name){ BrowserPanel =
1212
let BrowserView = new Proxy({}, { get: function(target, name){ BrowserView = require('./BrowserView'); return typeof BrowserView[name] == 'function' ? BrowserView[name].bind(BrowserView) : BrowserView[name]}})
1313

1414
const isDarwin = process.platform === 'darwin'
15-
const isWin = process.platform == 'win32';
1615

1716
let isFirstLoad
1817

@@ -33,7 +32,6 @@ export default class webContents extends EventEmitter {
3332
ipcMain.on('arrange-panels', (e,val)=>{
3433
console.log('webContents.disableFocus2' ,val)
3534
webContents.disableFocus = val
36-
if(isWin) return
3735

3836
const bw = BrowserWindow.fromWebContents(e.sender)
3937
const panels = BrowserPanel.getBrowserPanelsFromBrowserWindow(bw)

src/render/BrowserNavbarLocation.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -465,14 +465,14 @@ export default class BrowserNavbarLocation extends Component {
465465
// prevLocValue: this.prevLocValue,
466466
// value: document.activeElement == this.input ? this.input.value : convertUrl
467467
// })
468-
console.trace('getValue', {
469-
value: document.activeElement == this.input ? this.input.value : convertUrl,
470-
prevLocation: this.prevLocation,
471-
convertUrl,
472-
inputValue: this.input && this.input.value,
473-
prevInputValue: this.prevInputValue,
474-
prevLocValue: this.prevLocValue
475-
})
468+
// console.trace('getValue', {
469+
// value: document.activeElement == this.input ? this.input.value : convertUrl,
470+
// prevLocation: this.prevLocation,
471+
// convertUrl,
472+
// inputValue: this.input && this.input.value,
473+
// prevInputValue: this.prevInputValue,
474+
// prevLocValue: this.prevLocValue
475+
// })
476476
if(this.prevLocation == convertUrl && this.prevInputValue == (this.input && this.input.value)){
477477
return this.prevLocValue
478478
}

0 commit comments

Comments
 (0)