// QuickAccessDivert // This is a script for Directory Opus. // See http://www.gpsoft.com.au/DScripts/redirect.asp?page=scripts for development information. // Called by Directory Opus to initialize the script function OnInit(initData) { initData.name = "QuickAccessDivert"; initData.version = "1.1"; initData.copyright = "(c) 2016-2019 Leo Davidson"; initData.url = "https://resource.dopus.com/viewtopic.php?f=3&t=28148"; initData.desc = "Go Up to real parent not Quick Access"; initData.default_enable = true; initData.min_version = "12.0"; } // Called before a new folder is read in a tab function OnBeforeFolderChange(beforeFolderChange) { if (beforeFolderChange.action == "parent" || beforeFolderChange.action == "back") { // Quick Access (2nd version for Opus 12.15.2 and above). if (beforeFolderChange.path == "::{679F85CB-0220-4080-B29B-5540CC05AAB6}" || beforeFolderChange.path == "shell:::{679F85CB-0220-4080-B29B-5540CC05AAB6}") { parentPath = beforeFolderChange.tab.path; if (parentPath.test_parent) { parentPath.Parent(); return parentPath; } } } }