网站备案拍照是什么,郑州网站制作服务,用dw建设个人网站视频,263企业邮箱官网入口自定义chormium-修改屏幕尺寸 屏幕尺寸信息雷同太大#xff0c;用作指纹信息#xff0c;作用不多。 但多个类似小信息组合在一起的话#xff0c;也就是成唯一指纹了。积少成多吧。 一、如何使用js获取屏幕信息
将下面的代码复制进F12控制台
console.log(screen.widt…自定义chormium-修改屏幕尺寸 屏幕尺寸信息雷同太大用作指纹信息作用不多。 但多个类似小信息组合在一起的话也就是成唯一指纹了。积少成多吧。 一、如何使用js获取屏幕信息
将下面的代码复制进F12控制台
console.log(screen.width, screen.width)
console.log(screen.height, screen.height)
console.log(screen.availWidth, screen.availWidth)
console.log(screen.availHeight, screen.availHeight)输出
screen.width 1707
screen.height 1067
screen.availWidth 1707
screen.availHeight 1019二、如何更改源码
打开 /third_party/blink/renderer/core/frame/screen.cc
1.头部加上(随便加在一个#include后面)
#include base/command_line.h2.找到
int Screen::availHeight() const {if (!DomWindow())return 0;return GetRect(/*available*/true).height();
}3.替换为
int Screen::availHeight() const {if (!DomWindow())return 0;// 追加base::CommandLine* base_command_line base::CommandLine::ForCurrentProcess();int seed;if (base_command_line-HasSwitch(fingerprints)) {std::istringstream(base_command_line-GetSwitchValueASCII(fingerprints)) seed; }else{auto now std::chrono::system_clock::now();std::time_t now_time_t std::chrono::system_clock::to_time_t(now);seed static_castint(now_time_t);}return GetRect(/*available*/true).height() - 10 - seed%10;//return GetRect(/*available*/true).height();
}4.编译
ninja -C out/Default chrome注意这里只更改了Screen::availHeight()函数剩下的几个函数小伙伴们按需更改。 Screen::height()Screen::width()Screen::availHeight()Screen::availWidth()
三、结语 写到这里小伙伴们修改chromium源码的技术已经炉火纯青了能引导集帅们入门是我的荣幸。 博客就写到这里吧后续我就不肝了。 玩游戏老是吃保底烦死了系列完结。