Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Bush2021/chrome_plus
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1.8.9
Choose a base ref
...
head repository: Bush2021/chrome_plus
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 1.9.0
Choose a head ref
  • 13 commits
  • 18 files changed
  • 3 contributors

Commits on Jun 30, 2024

  1. chore: update submodules

    Bush2021 committed Jun 30, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    5e524a9 View commit details

Commits on Jul 4, 2024

  1. feat: replace hook library to support arm64

    Related issues: #37 #52 #88.
    
    Co-authored-by: Ritchie1108 <Ritchie1108@gmail.com>
    Co-authored-by: YorkWaugh <67750590+YorkWaugh@users.noreply.github.com>
    3 people committed Jul 4, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    fd0f7b2 View commit details
  2. Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    4f38e7c View commit details
  3. Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    2ff38f0 View commit details

Commits on Jul 19, 2024

  1. fix: reimplement IsOnBookmark to fix #93

    The code changes in this commit improve the bookmark handling logic. Specifically, the `IsOnMenuBookmark` function has now been merged into `IsOnBookmark`, and the associated functions have been merged/removed as well. `IsOnBookmark` now directly recursively checks for `ROLE_SYSTEM_PUSHBUTTON` or `ROLE_SYSTEM_MENUITEM` under the `hwnd` of `Chrome_Widget_`, so it is no longer necessary to handle bookmarks on the bookmarks bar and bookmarks in bookmark folders with two separate functions.
    
    The reimplemented function also resolves #93, as it avoids misjudgments caused by raw traversal of invisible nodes.
    
    Co-authored-by: Ritchie1108 <Ritchie1108@gmail.com>
    Bush2021 and Ritchie1108 committed Jul 19, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    b204396 View commit details

Commits on Jul 22, 2024

  1. Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    f7bfa9d View commit details
  2. Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    58b0f68 View commit details

Commits on Jul 23, 2024

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    8a86f66 View commit details

Commits on Aug 2, 2024

  1. fix: quick clicking on close button triggers double-click close command

    Since the close button is a child element of the page tab, quickly clicking the close button can trigger `HandleDoubleClick`, leading to incorrect command execution. The correct behavior should be to revert to the browser's original operation behavior. This commit adds a rough `IsOnCloseButton` check, which simply traverses push buttons and checks if the mouse is over it. It cannot be used alone to accurately identify the close button, so it is recommended to call it in conjunction with `IsOnOneTab`.
    Bush2021 committed Aug 2, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    085aca9 View commit details
  2. Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    917361a View commit details

Commits on Aug 21, 2024

  1. Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    4be523d View commit details

Commits on Aug 22, 2024

  1. Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    d699e08 View commit details
  2. chore: update 1.9.0 binaries

    Bush2021 committed Aug 22, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    ac253f0 View commit details
Showing with 266 additions and 498 deletions.
  1. +1 −0 .github/workflows/build.yml
  2. +3 −3 .gitmodules
  3. +4 −6 VC-LTL5.lua
  4. +1 −0 detours
  5. +0 −1 minhook
  6. BIN setdll/chrome++32.dll
  7. BIN setdll/chrome++64.dll
  8. BIN setdll/setdll.7z
  9. +7 −15 src/appid.h
  10. +12 −20 src/chrome++.cpp
  11. +57 −159 src/green.h
  12. +9 −44 src/hijack.h
  13. +71 −133 src/iaccessible.h
  14. +54 −45 src/pakpatch.h
  15. +9 −7 src/patch.h
  16. +27 −56 src/tabbookmark.h
  17. +2 −2 src/version.h
  18. +9 −7 xmake.lua
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@ jobs:
include: [
{ name: Chrome++_x86, arch: x86 },
{ name: Chrome++_x64, arch: x64 },
{ name: Chrome++_arm64, arch: arm64 }
]

name: ${{ matrix.name }}
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[submodule "minhook"]
path = minhook
url = https://github.com/TsudaKageyu/minhook
[submodule "mini_gzip"]
path = mini_gzip
url = https://github.com/Bush2021/mini_gzip
[submodule "detours"]
path = detours
url = https://github.com/microsoft/Detours
10 changes: 4 additions & 6 deletions VC-LTL5.lua
Original file line number Diff line number Diff line change
@@ -28,11 +28,9 @@ target("VC-LTL-5")
runenvs.INCLUDE = includepath .. runenvs.INCLUDE

local arch = target:arch()
local archpath = "Win32"
if arch=="x86" then
archpath = "Win32"
elseif arch=="x64" then
archpath = "x64"
local archpath = "Win32"
if arch ~= "x86" then
archpath = arch
end
cprint("${color.warning}Platform : %s", archpath)
local libpath = VC_LTL_Root .. [[TargetPlatform\]] .. WindowsTargetPlatformMinVersion..[[\lib\]] .. archpath .. ";"
@@ -41,4 +39,4 @@ target("VC-LTL-5")

-- print(runenvs.INCLUDE)
-- print(runenvs.LIB)
end)
end)
1 change: 1 addition & 0 deletions detours
Submodule detours added at 4b8c65
1 change: 0 additions & 1 deletion minhook
Submodule minhook deleted from 1cc461
Binary file modified setdll/chrome++32.dll
Binary file not shown.
Binary file modified setdll/chrome++64.dll
Binary file not shown.
Binary file modified setdll/setdll.7z
Binary file not shown.
22 changes: 7 additions & 15 deletions src/appid.h
Original file line number Diff line number Diff line change
@@ -5,10 +5,7 @@
#include <propvarutil.h>
#include <shobjidl.h>

typedef HRESULT(WINAPI* pPSStringFromPropertyKey)(REFPROPERTYKEY pkey,
LPWSTR psz,
UINT cch);
pPSStringFromPropertyKey RawPSStringFromPropertyKey = nullptr;
auto RawPSStringFromPropertyKey = PSStringFromPropertyKey;

HRESULT WINAPI MyPSStringFromPropertyKey(REFPROPERTYKEY pkey,
LPWSTR psz,
@@ -24,17 +21,12 @@ HRESULT WINAPI MyPSStringFromPropertyKey(REFPROPERTYKEY pkey,
}

void SetAppId() {
HMODULE Propsys = LoadLibrary(L"Propsys.dll");

PBYTE PSStringFromPropertyKey =
(PBYTE)GetProcAddress(Propsys, "PSStringFromPropertyKey");
MH_STATUS status =
MH_CreateHook(PSStringFromPropertyKey, MyPSStringFromPropertyKey,
(LPVOID*)&RawPSStringFromPropertyKey);
if (status == MH_OK) {
MH_EnableHook(PSStringFromPropertyKey);
} else {
DebugLog(L"MH_CreateHook PSStringFromPropertyKey failed:%d", status);
DetourTransactionBegin();
DetourUpdateThread(GetCurrentThread());
DetourAttach((LPVOID*)&RawPSStringFromPropertyKey, MyPSStringFromPropertyKey);
auto status = DetourTransactionCommit();
if (status != NO_ERROR) {
DebugLog(L"SetAppId failed %d", status);
}
}

32 changes: 12 additions & 20 deletions src/chrome++.cpp
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ HMODULE hInstance;

#define MAGIC_CODE 0x1603ABD9

#include "MinHook.h"
#include "detours.h"
#include "version.h"

#include "hijack.h"
@@ -68,36 +68,28 @@ void InstallLoader() {
MODULEINFO mi;
GetModuleInformation(GetCurrentProcess(), GetModuleHandle(nullptr), &mi,
sizeof(MODULEINFO));
PBYTE entry = (PBYTE)mi.EntryPoint;

// Jump from the original entry to the loader.
MH_STATUS status = MH_CreateHook(entry, Loader, (LPVOID*)&ExeMain);
if (status == MH_OK) {
MH_EnableHook(entry);
} else {
DebugLog(L"MH_CreateHook InstallLoader failed:%d", status);
ExeMain = (Startup)mi.EntryPoint;

DetourTransactionBegin();
DetourUpdateThread(GetCurrentThread());
DetourAttach((LPVOID*)&ExeMain, Loader);
auto status = DetourTransactionCommit();
if (status != NO_ERROR) {
DebugLog(L"InstallLoader failed: %d", status);
}
}
#define EXTERNC extern "C"

//
EXTERNC __declspec(dllexport) void portable() {}
__declspec(dllexport) void portable() {}

EXTERNC BOOL WINAPI DllMain(HINSTANCE hModule, DWORD dwReason, LPVOID pv) {
BOOL WINAPI DllMain(HINSTANCE hModule, DWORD dwReason, LPVOID pv) {
if (dwReason == DLL_PROCESS_ATTACH) {
DisableThreadLibraryCalls(hModule);
hInstance = hModule;

// Maintain the original function of system DLLs.
LoadSysDll(hModule);

// Install the loader after successfully initializing MinHook.
MH_STATUS status = MH_Initialize();
if (status == MH_OK) {
InstallLoader();
} else {
DebugLog(L"MH_Initialize failed:%d", status);
}
InstallLoader();
}
return TRUE;
}
Loading