Edge浏览器怎么设置关闭最后一个标签时不关闭浏览器?

类似360的这种设置
image

找着两个edge商店的拓展
image

image

不过都会多出来一个空白标签保持固定,不够干净。

https://github.com/shuax/edge_plus

这个

1 个赞

不知道文件放哪个路径文件夹里去,
我放了edge文档的三个地方也没有用。

C:\Program Files (x86)\Microsoft\Edge\Application
即可,关闭最后一个标签时会打开一次新标签页,再点击就会关闭浏览器

1 个赞

没有作用

一个取巧的办法:将一个标签页固定到左边,常驻

追求性能的话可以固定一个空白标签页
追求实用的话可以固定一个导航页或者自己写的本地 html 文件

1 个赞

:rofl:你重启过没 edge会常驻后台,需要结束后台再开才正常

重启电脑都不能用,已放弃……

最后用的插件 Don’t Close Window With Last Tab
edge商店里就有

有点好奇,这个需求的作用是什么?

作用就是
将关闭当前标签 和 关闭浏览器 两个操作更明确地分离开来。

vivaldi,firefox、360等浏览器都支持,不知道edge为什么不原生支持一下。

我是先打开一个空白标签页,然后再关闭。

这方面,yandex浏览器的表现是最好的。

不打开任何标签情况下,就不显示任何标签。
把关闭标签和关闭浏览器彻底分离了。

求背景图 :heart_eyes:

谢谢 :smiley:

在网上看到一个新方案,
ahk代码,原理是每次按下ctrl+w 时,先数一数浏览器(edge或chrome)现在有几个打开的标签页,如果只有一个的化,就不关闭它,而是转到主页。

比那些需要固定一个标签的方法都美观和优雅一些。
缺点是通过鼠标点叉叉关闭标签页还是会导致浏览器关闭。

#include winenum.ahk

#ifwinactive ahk_exe chrome.exe
^w::
	_number_of_tabs_in_this_chrome_window := WinEnum(WinExist("A")).length()

	if (_number_of_tabs_in_this_chrome_window=1)
		send !{home}
	else
		send ^w
return

#ifwinactive ahk_exe msedge.exe

^w::
	_number_of_tabs_in_this_chrome_window := WinEnum(WinExist("A")).length()

	if (_number_of_tabs_in_this_chrome_window=1)
		send !{home}
	else
		send ^w
return

#if

winenum.ahk的代码

/* Function: WinEnum
 *     Wrapper for Enum(Child)Windows [http://goo.gl/5eCy9 | http://goo.gl/FMXit]
 * License:
 *     WTFPL [http://wtfpl.net/]
 * Syntax:
 *     windows := WinEnum( [ hwnd ] )
 * Parameter(s) / Return Value:
 *     windows   [retval] - an array of window handles
 *     hwnd     [in, opt] - parent window. If specified, EnumChildWindows is
 *                          called. Accepts a window handle or any string that
 *                          match the WinTitle[http://goo.gl/NdhybZ] parameter.
 * Example:
 *     win := WinEnum() ; calls EnumWindows
 *     children := WinEnum("A") ; enumerate child windows of the active window
 */
WinEnum(hwnd:=0, lParam:=0) ;// lParam (internal, used by callback)
{
	static pWinEnum := "X"
	if (A_EventInfo != pWinEnum)
	{
		if (pWinEnum == "X")
			pWinEnum := RegisterCallback(A_ThisFunc, "F", 2)
		if hwnd
		{
			;// not a window handle, could be a WinTitle parameter
			if !DllCall("IsWindow", "Ptr", hwnd)
			{
				prev_DHW := A_DetectHiddenWindows
				prev_TMM := A_TitleMatchMode
				DetectHiddenWindows On
				SetTitleMatchMode 2
				hwnd := WinExist(hwnd)
				DetectHiddenWindows %prev_DHW%
				SetTitleMatchMode %prev_TMM%
			}
		}
		out := []
		if hwnd
			DllCall("EnumChildWindows", "Ptr", hwnd, "Ptr", pWinEnum, "Ptr", &out)
		else
			DllCall("EnumWindows", "Ptr", pWinEnum, "Ptr", &out)
		return out
	}

	;// Callback - EnumWindowsProc / EnumChildProc
	static ObjPush := Func(A_AhkVersion < "2" ? "ObjInsert" : "ObjPush")
	%ObjPush%(Object(lParam + 0), hwnd)
	return true
}

Don’t Close Window With Last Tab这个插件在win11中似乎出现1个问题:
最后一个标签页保持打开15s以上,然后关闭,会出现2个新标签页;正常情况是关闭后出现1个新标签页和1个固定在最左边的缩小的标签页。

win10中仍然是正常的。烦请看看您那是否也是这样。

好耶刚好我也在找这个问题的解决方法。

不过我的需求是因为iCloud密码管理器每次重新打开浏览器都要输入一次验证码,很是讨厌 :rofl: