This repository has been archived by the owner on Mar 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathOperaU.txt
198 lines (182 loc) · 10.1 KB
/
OperaU.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
@echo off
set ver=1.0.3.3D
SetLocal EnableExtensions
SetLocal EnableDelayedExpansion
set k=taskkill /f /t /im
pushd %~dp0
rem Opera检测 & 参数调用
if exist "Gdi++\gdi++.exe" echo OperaU.bat /gdi >@GDI.bat
if exist "OperaU.ico" echo OperaU.bat /opcl >@Clean.bat
if '%1'=='opis' goto:opinst
if '%1'=='/opup' goto:opupdate
if '%1'=='/gdi' mshta vbscript:msgbox("在以GDI方式启动Opera前,请先手动关闭当前浏览器窗口!",64,"OperaU")(window.close)&mshta vbscript:msgbox("已经在桌面上创建 以GDI方式启动Opera的快捷方式!",64,"OperaU")(window.close)&mshta VBScript:Execute("Set a=CreateObject(""WScript.Shell""):Set b=a.CreateShortcut(a.SpecialFolders(""Desktop"") & ""\Opera Gdi+.lnk""):b.TargetPath=""%~dp0Gdi.vbs"":b.WorkingDirectory=""%~dp0\"":b.IconLocation=""%~dp0opera.exe"":b.Description=""以GDI+方式启动Opera"":b.Save:close")&goto menu
if '%1'=='/opcl' goto:opclean
if '%1'=='tv' goto:tv
if '%1'=='help' goto:help
if '%1'=='dft' goto:makedefault
if '%1'=='md5' goto:md5
:updateu
rem 自动检测升级模块
echo Set oDOM = WScript.GetObject(WScript.Arguments(0)) >%temp%/chkver.vbs
echo do until oDOM.readyState = "complete" >>%temp%/chkver.vbs
echo WScript.sleep 50 >>%temp%/chkver.vbs
echo loop >>%temp%/chkver.vbs
echo WScript.echo oDOM.documentElement.outerText >>%temp%/chkver.vbs
cscript //NoLogo /e:vbscript %temp%/chkver.vbs "http://simpleu.googlecode.com/svn/trunk/Opera/ver.txt">%temp%/ver.txt 2>nul
for /f %%i in (%temp%\ver.txt) do set verNew=%%i
if %ver%==%verNew% (goto opupdate) else (echo Download the lastest version! & choice /t 2 /d y /n >nul & goto Updates)
cls
goto:eof
:opupdate
if not exist wget.exe goto echo 没有找到Wget.exe& choice /t 2 /d y /n >nul & goto exit
Tasklist|Find /i "opera.exe">nul&mshta vbscript:msgbox("请先退出Opera!!",64,"SimpleU")(window.close)&Pause
echo 正在下载数据,请稍候... ...
set d=wget -c -N
rem --no-check-certificate
del files.sig files_old.sig operaprefs_default.ini client-zh-cn.zip readme.html defaults\bookmarks.adr defaults\license.txt defaults\search.ini defaults\standard_speeddial.ini
wget -N http://simpleu.googlecode.com/svn/trunk/Opera/readme.html
wget -N http://simpleu.googlecode.com/svn/trunk/Opera/operaprefs_default.ini
%d% http://simpleu.googlecode.com/svn/trunk/Opera/fastforward.ini
%d% http://simpleu.googlecode.com/svn/trunk/Opera/feedreaders.ini
%d% http://simpleu.googlecode.com/svn/trunk/Opera/webmailproviders.ini
%d% http://simpleu.googlecode.com/svn/trunk/Opera/license.txt
%d% http://simpleu.googlecode.com/svn/trunk/Opera/bookmarks.adr
%d% http://simpleu.googlecode.com/svn/trunk/Opera/standard_speeddial.ini
%d% http://simpleu.googlecode.com/svn/trunk/Opera/override.ini
%d% http://simpleu.googlecode.com/svn/trunk/Opera/search.ini
%d% http://simpleu.googlecode.com/svn/trunk/Opera/urlfilter.ini
%d% http://simpleu.googlecode.com/svn/trunk/css/AdFilter.css
%d% http://simpleu.googlecode.com/svn/trunk/css/BBS.css
%d% http://simpleu.googlecode.com/svn/trunk/css/OperaChina.css
%d% http://simpleu.googlecode.com/svn/trunk/css/OperaU.css
%d% http://simpleu.googlecode.com/svn/trunk/css/YaHei.css
%d% http://simpleu.googlecode.com/svn/trunk/scripts/Super_preloader.db.js
%d% http://simpleu.googlecode.com/svn/trunk/Opera/standard_keyboard.ini
%d% http://simpleu.googlecode.com/svn/trunk/Opera/standard_mouse.ini
%d% http://simpleu.googlecode.com/svn/trunk/Opera/standard_menu.ini
%d% http://simpleu.googlecode.com/svn/trunk/Opera/standard_menu1164.ini
%d% http://simpleu.googlecode.com/svn/trunk/Opera/standard_toolbar.ini
move /y license.txt locale\en
move /y bookmarks.adr locale\zh-cn
move /y standard_speeddial.ini locale\zh-cn
move /y Super_preloader.db.js profile\script
move /y override.ini profile
move /y search.ini profile
move /y fastforward.ini ui
move /y feedreaders.ini defaults
move /y webmailproviders.ini defaults
move /y urlfilter.ini profile
move /y standard_keyboard.ini profile\keyboard
move /y standard_menu.ini profile\menu
move /y standard_menu1164.ini profile\menu
move /y standard_mouse.ini profile\mouse
move /y standard_toolbar.ini profile\toolbar
move /y AdFilter.css profile\styles\user
move /y BBS.css profile\styles\user
move /y OperaChina.css profile\styles\web
move /y OperaU.css profile\styles\user
move /y YaHei.css profile\styles\user
wget --no-check-certificate -N "https://dragonfly.opera.com/app/stp-1/zips/latest/client-zh-cn.zip"
ren client-zh-cn.zip dragonfly.zip
move /y dragonfly.zip profile
cls & echo 配置文件已是最新状态!& choice /t 2 /d y /n >nul
rem pushd %~dp0
set d=wget -c -N -O profile\script\
%d%163NewsComments.user.js http://userscripts.org/scripts/source/156627.user.js
%d%Anti-Disabler.user.jsx http://userscripts.org/scripts/source/30096.user.js
%d%GgImgdirect.js http://userscripts.org/scripts/source/48293.user.js
%d%CrackUrlDN.js http://userscripts.org/scripts/source/153190.user.js
%d%Linkify.js http://userscripts.org/scripts/source/154473.user.js
%d%MusicBeauty.js http://userscripts.org/scripts/source/161719.user.js
%d%Search_engineJump.js http://userscripts.org/scripts/source/164877.user.js
%d%ShareEasyDownload.user.js http://userscripts.org/scripts/source/155175.user.js
%d%Super_preloader.db.js http://simpleu.googlecode.com/svn/trunk/scripts/Super_preloader.db.js
%d%TiebaFix.js http://userscripts.org/scripts/source/153687.user.js
%d%XLKCname.user.js http://userscripts.org/scripts/source/136840.user.js
%d%YoukuAntiADs.user.js http://userscripts.org/scripts/source/119622.user.js
%d%YtbDown.user.js http://userscripts.org/scripts/source/25105.user.js
%d%doubaniask.user.js http://userscripts.org/scripts/source/123244.user.js
%d%doubanimdb.user.js http://userscripts.org/scripts/source/103552.user.js
%d%goglrd.js http://userscripts.org/scripts/source/154702.user.js
%d%greasemonkey-emulation.user.jsx http://userscripts.org/scripts/source/105153.user.js
%d%http2https.js http://userscripts.org/scripts/source/154476.user.js
%d%nolazyload.js http://userscripts.org/scripts/source/151249.user.js
msg %username% /time:3 "【UserJs数据已更新!】"& exit
:opinst
opera.exe -install /desktopshortcut 1 /quicklaunchshortcut 0 /startmenushortcut 0 /setdefaultbrowser 0 /launchopera 1
if not exist %windir%\system32\OperaJR.exe copy program\OperaJR.exe %SystemRoot%\system32 >nul 2>nul
reg add "HKCR\operajr" /v "FriendlyTypeName" /d "opera" /f >nul 2>nul
reg add "HKCR\operajr" /v "URL Protocol" /d "" /f >nul 2>nul
reg add "HKCR\operajr\shell\open\command" /ve /d "\"C:\Windows\System32\OperaJR.exe\" \"%%1\"" /f >nul 2>nul
reg add "HKCR\operajr\shell\open\command" /v "Browser" /d "C:\Program Files\Internet Explorer\iexplore.exe" /f >nul 2>nul
reg add "HKCU\Software\Classes\operajr" /v "FriendlyTypeName" /d "opera" /f >nul 2>nul
reg add "HKCU\Software\Classes\operajr" /v "URL Protocol" /d "" /f >nul 2>nul
reg add "HKCU\Software\Classes\operajr\shell\open\command" /ve /d "\"C:\Windows\System32\OperaJR.exe\" \"%%1\"" /f >nul 2>nul
reg add "HKCU\Software\Classes\MIME\Database\Content Type\text/vnd.wap.wml" /v "CLSID" /d "{25336920-03F9-11cf-8FD0-00AA00686F13}" /f >nul 2>nul
reg add "HKCU\Software\Classes\MIME\Database\Content Type\application/xhtml+xml" /v "CLSID" /d "{25336920-03F9-11cf-8FD0-00AA00686F13}" /f >nul 2>nul
reg add "HKCU\Software\Classes\MIME\Database\Content Type\application/vnd.wap.xhtml+xml" /v "CLSID" /d "{25336920-03F9-11cf-8FD0-00AA00686F13}" /f >nul 2>nul
goto exit
:opclean
rd /s /q updatechecker
rd /s /q "%AppData%\Opera"
cd "profile\"
del /f /q autoupdate_response.xml download.dat global_history.dat search_field_history.dat tasks.xml vlink4.dat opuntrust.dat optrust.dat optrb.dat typed_history.xml upgrade.log
rd /s /q application_cache cache dictionaries icons opcache pstorage temporary_downloads vps webserver
echo 使用痕迹清理完毕!
goto:eof
:tv
rem start opera.exe "file://localhost/%~dp0/optools/HtmlTool/FYTV.html"
start opera.exe "file://localhost/%~dp0/optools/HtmlTool/TV.html" & exit
:help
rem start locale\en\license.txt &
start opera.exe "file://localhost/%~dp0/readme.html" & exit
:qq
start opera.exe "tencent://message/?uin=1718084&Menu=yes" & exit
:netfix
netsh winsock reset & exit
:urlfilter
sed -i -e "/^=UUID/d" -e "s/=UUID.*//g" "%cd%"\urlfilter.ini & exit
:makedefault
mshta vbscript:msgbox("请勾选使用绝对路径,以解决通过调用打开链接时的相对路径问题!!!",64,"SimpleU")(window.close)&Pause
Start GreenPath.exe &echo 设置当前目录的Opera为默认浏览器&pause& set mypwd=%CD:\=\% & for %%L IN (HTTP https htmlfile) DO REG ADD HKLM\SOFTWARE\Classes\%%L\shell\Opera\command /v "" /t REG_SZ /d "\"%mypwd%\opera.exe\" \"%%1\"" /f > nul & for %%L IN (HTTP https htmlfile) DO REG ADD HKLM\SOFTWARE\Classes\%%L\shell /v "" /t REG_SZ /d "Opera" /f > nul & echo 已经完成Opera目录设置 &exit
:md5
del /q /a "%temp%\downifo" >nul 2>nul
start "" /wait "%~dp0optools\nircmd.exe" clipboard writefile "%temp%\downifo"
(for /f "usebackq tokens=1*" %%a in ("%temp%\downifo") do (
if exist "%%b" set "p=%%b" & goto md5continue
)) >nul 2>nul
echo._____&echo.文件不存在,可能已经被删除!&ping 00 -n 2 -w 888 >nul & exit
:md5continue
start "" "%~dp0optools\hash.exe" "%p%" & exit
:deldown
title 删除文件
mode con cols=20 lines=2
del /q /a "%temp%\downifo" >nul 2>nul
start "" /wait "%~dp0nircmd.exe" clipboard writefile "%temp%\downifo"
(for /f "usebackq tokens=1*" %%a in ("%temp%\downifo") do (
if exist "%%b" set "p=%%b" & goto deldown2
)) >nul 2>nul
exit
:deldown2
del /a /f "%p%" & exit
:Updateit
msg %username% /time:2 "【新版本升级中,请稍后!】"
echo @echo off>%temp%\up.bat
echo copy /y "%temp%\OperaU.bat" "%~dp0\%~n0.bat"^>nul >>%temp%\up.bat
echo start "" "%~dp0\%~n0.bat">>%temp%\up.bat
echo Exit>>%temp%\up.bat
start %temp%\up.bat
exit
:Updates
echo Download and Update...
echo Set oDOM = WScript.GetObject(WScript.Arguments(0)) >%temp%/Upnew.vbs
echo do until oDOM.readyState = "complete" >>%temp%/Upnew.vbs
echo WScript.sleep 200 >>%temp%/Upnew.vbs
echo loop >>%temp%/Upnew.vbs
echo WScript.echo oDOM.documentElement.outerText >>%temp%/Upnew.vbs
cscript //NoLogo /e:vbscript %temp%/Upnew.vbs "http://simpleu.googlecode.com/svn/trunk/Opera/OperaU.txt">%temp%\OperaU.bat
set size=7000
for %%1 in (OperaU.bat)do set gsize=%%~z1
cls
if %gsize% gtr %size% (echo 网络获取失败,正在努力获取&wget http://simpleu.googlecode.com/svn/trunk/Opera/OperaU.txt -o %temp% &ren OperaU.Src OperaU.bat&goto Updateit) else (goto Updateit)
goto:eof