# TabCloseHistory\_Undo : Record the path of closed tab, and restore them multiple times in order

**URL:** <https://resource.dopus.com/t/tabclosehistory-undo-record-the-path-of-closed-tab-and-restore-them-multiple-times-in-order/59677>\
**Category:** Buttons/Scripts\
**Tags:** button, jscript\
**Created:** [June 9, 2026, 1:27pm UTC](https://resource.dopus.com/t/tabclosehistory-undo-record-the-path-of-closed-tab-and-restore-them-multiple-times-in-order/59677 "2026-06-09T13:27:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bytim](https://resource.dopus.com/letter_avatar_proxy/v4/letter/b/e480ec/32.png) [@bytim](https://resource.dopus.com/u/bytim)\
**Post date:** [June 9, 2026, 1:27pm UTC](https://resource.dopus.com/t/tabclosehistory-undo-record-the-path-of-closed-tab-and-restore-them-multiple-times-in-order/59677/1 "2026-06-09T13:27:00Z")

</div>

Since DOpus can only restore only one tab that was just closed, this is not enough.  
It‘’s better to be able to restore multiple closed tabs like a web browser.  
This script can almost achieve this. Although not perfect, it is sufficient for restoring those tabs that were mistakenly closed.

# Screenshot

Script config:  
MaxHistory: Maximum number of historical records (最大历史记录数)

 ![image](https://resource.dopus.com/uploads/default/original/3X/7/7/77117ffa8c4d8a7d868e9c44140814be0e8b45ef.png)

Dynamic buttons list

 ![image](https://resource.dopus.com/uploads/default/original/3X/8/4/843c16b0626eb4f3bade6db7697c0a02e633129d.png)

# Usage / Command in a button

This script add a command: **UndoCloseTab**  
We can using **Ctrl+Shift+T** to Undo CloseTab many times like in web browsers.

```auto
UndoCloseTab → Restoring recently closed tabs (can be done and sequentially)
UndoCloseTab NUMBER=2 → Restore the second to last closed tab
UndoCloseTab NUMBER=3 → Restore the third to last closed tab
UndoCloseTab CLEAR → Clear history list 
UndoCloseTab LIST → Generate a list of dynamic buttons which can restore paths of closed tabs
UndoCloseTab LIST=nosub → Generate dynamic buttons (Non submenu)

UndoCloseTab → 恢复刚刚关闭的标签 可连续依次恢复
UndoCloseTab NUMBER=2 → 恢复倒数第2个关闭的标签
UndoCloseTab NUMBER=3 → 恢复倒数第3个关闭的标签
UndoCloseTab CLEAR → 清除历史标签记录
UndoCloseTab LIST → 生成一系列动态按钮用以恢复关闭标签的路径
UndoCloseTab LIST=nosub → 生成动态按钮(非子菜单形式)

```

# Download

Download it and double-click it to install the script.  
[2026.6.10 : TabCloseHistory\_Undo.opusscriptinstall](https://resource.dopus.com/uploads/short-url/33Cy0bSQ1yRrQkAC6AaVXyoYYug.opusscript) (3.7 KB)

  

Buttons, drag .dcf file to your toolbar.  
[Ctrl+Shift+T : Undo CloseTab.dcf](https://resource.dopus.com/uploads/short-url/Cv2eNGkBRzUz6wEV3xVRapBHa0.dcf) (865 字节)  
[Recently closed tabs.dcf](https://resource.dopus.com/uploads/short-url/tGAGJGyorPYRqueyO1lei0XEd89.dcf) (319 字节)

[Ctrl+Shift+T : 取消关闭标签页.dcf](https://resource.dopus.com/uploads/short-url/gQNZjH4WfUK058RfYfwylG330gY.dcf) (1.3 KB)  
[最近关闭的标签.dcf](https://resource.dopus.com/uploads/short-url/k8ppo1hUUdANHZ8XQ1Dfdi1qsgT.dcf) (328 字节)
