/, selled_img);
818 | body.content = ncontent;
819 | return superVip._CONFIG_.hjedd ? body : util.jencode(body, isPlus);
820 | }
821 |
822 | const util = {
823 | initAppDate: (haveBox = true)=>{
824 | let roles = '';
825 | if(superVip._CONFIG_.user && superVip._CONFIG_.user.roles){
826 | superVip._CONFIG_.user.roles.sort((a,b) =>{
827 | return a.e < b.e? 1: -1
828 | })
829 | superVip._CONFIG_.user.roles.forEach(item => {
830 | if(item.e > 2047980427789){
831 | item.vip_day = '永久'
832 | }else{
833 | const time = item.e - Date.now()
834 | if(time < 86400000 && time > 0){
835 | if(time > 3600000){
836 | item.vip_day = parseInt(time / 3600000) + '小时'
837 | }else{
838 | item.vip_day = parseInt(time / 60000) + '分钟'
839 | }
840 | }else if(time <= 0){
841 | item.vip_day = '已过期'
842 | item.expire = true
843 | }else{
844 | item.vip_day = parseInt(time / 86400000) + '天'
845 | const d = time % 86400000
846 | if(d > 3600000){
847 | item.vip_day += parseInt(d / 3600000) + '小时'
848 | }
849 | }
850 | }
851 | roles += `
852 |
853 |
854 |

855 |
856 |
857 |
${item.n}
858 |
${new Date(item.e).toLocaleString()}
859 |
860 |
861 |
剩余时间
862 |
${item.vip_day}
863 |
864 |
865 | `;
866 | })
867 | if(haveBox){
868 | $('#wt-set-box .user-box-container .user-box .apps-container').empty()
869 | $('#wt-set-box .user-box-container .user-box .apps-container').append(roles)
870 | }
871 | }
872 | return haveBox? '': roles
873 | },
874 |
875 | copyText: (text) => {
876 | if (navigator.clipboard && window.isSecureContext) {
877 | return navigator.clipboard.writeText(text);
878 | } else if (document.execCommand) {
879 | const textArea = document.createElement('textarea');
880 | textArea.style.position = 'fixed';
881 | textArea.style.top = textArea.style.left = '-100vh';
882 | textArea.style.opacity = '0';
883 | textArea.value = text;
884 | document.body.appendChild(textArea);
885 | textArea.focus();
886 | textArea.select();
887 | try {
888 | const success = document.execCommand('copy');
889 | return success ? Promise.resolve() : Promise.reject();
890 | } catch (err) {
891 | return Promise.reject(err);
892 | } finally {
893 | textArea.remove();
894 | }
895 | } else {
896 | return Promise.reject(new Error('Clipboard API not supported and execCommand not available.'));
897 | }
898 | },
899 |
900 | logined: () => {
901 | $("#wt-my img").addClass('margin-left')
902 | $('#wt-my img').attr('src', superVip._CONFIG_.user.avatar)
903 | $('#wt-set-box .user-box-container .user-info').css('display', 'flex')
904 | $('#wt-set-box .user-box-container .user-info img').attr('src', superVip._CONFIG_.user.avatar)
905 | $('#wt-set-box .user-box-container .user-info .nickname').html(superVip._CONFIG_.user.nickname)
906 | $('#wt-set-box .user-box-container .user-info .username').html(superVip._CONFIG_.user.username)
907 | },
908 |
909 | logouted: (msg) => {
910 | superVip._CONFIG_.user = '';
911 | $("#wt-my img").removeClass('margin-left')
912 | $('#wt-my img').attr('src', superVip._CONFIG_.cdnBaseUrl + '/image/app.png')
913 | $('#wt-set-box .user-box-container .user-info').css('display', 'none')
914 | GM_setValue('jsxl_user', '')
915 | if(msg){
916 | util.showTips({
917 | title: '请重新登录,errMsg:' + msg
918 | })
919 | }
920 | },
921 |
922 | showAndHidTips: (name, op = 'set', val = true) => {
923 | let tips = GM_getValue('wt_tips', {})
924 | if (!tips) tips = {}
925 | if (op == 'set') {
926 | tips[name] = val
927 | GM_setValue('wt_tips', tips)
928 | if (val) $('.' + name).addClass('tips-yuan')
929 | else $('.' + name).removeClass('tips-yuan')
930 | return true
931 | } else {
932 | return tips[name] ? true : false
933 | }
934 | },
935 |
936 | addLogin: () => {
937 | if ($('#wt-login-box').length > 0) {
938 | $("#wt-login-box input").val('');
939 | return;
940 | }
941 | $('body').append(`
942 |
943 |
944 |
945 |
@${superVip._CONFIG_.homeUrl}
946 |
v ${superVip._CONFIG_.version}
947 |
948 |
949 |
登录码
950 |
951 |
952 |
953 |
954 |
955 |
注册登录码
956 |
去发电获取权限?
957 |
958 |
959 | `)
960 | GM_addStyle(`
961 | #wt-login-mask{ display: none;position: fixed;top: 0;left: 0;right: 0;bottom: 0;z-index: 11000;background-color: #0000004d;}
962 | #wt-login-box{position: fixed;margin-top: 3%;top: 50%;left: 50%;transform: translate(-50%,-50%) scale(0);overflow: hidden;background-color: white;padding: 30px;padding-bottom: 0;border-radius: 10px;z-index: 11010;}
963 | #wt-login-box::before{display: none; content:'';position: absolute;width: 250px;height: 250px;border-radius: 200px;background-color: #00bcd4;z-index: -1;opacity: 0.7;bottom: 110px;right: 100px;}
964 | #wt-login-box::after{display: none;content:'';position: absolute;width: 250px;height: 250px;border-radius: 200px;background-color: #2196F3;z-index: -1;opacity: 0.7;top: 115px;right: -112px;}
965 | #wt-login-box .close{position: absolute;right: 0px;top: 0px;width: 40px;height: 40px;}
966 | #wt-login-box .close::before,#wt-login-box .close::after{position: absolute;left: 50%;top: 50%;content: '';width: 16px;height: 2px;border-radius: 1px;background-color: #222;transform: translate(-50%,-50%) rotate(45deg);}
967 | #wt-login-box .close::after,#wt-set-box .close::after{transform: translate(-50%,-50%) rotate(-45deg);}
968 | #wt-login-box .max-input{display: block;margin: 0 auto;resize: none;width: 180px;font-size: 12px;height: 150px;outline: none;padding: 10px;border-radius: 12px;border: none;background-color: #f5f5f5;color: #838383;}
969 | #wt-login-box textarea::-webkit-input-placeholder {letter-spacing: 1px;color: #ccc;}
970 | #wt-login-box textarea:-moz-placeholder {letter-spacing: 1px;color: #ccc;}
971 | #wt-login-box textarea::-moz-placeholder {letter-spacing: 1px;color: #ccc;}
972 | #wt-login-box .title{font-weight: 600;font-size: 16px;color: #3a3a3a;text-align: center;margin-bottom: 20px;}
973 | #wt-login-box .j-login-btn{width: 100px;padding: 2px;height: 40px;font-size: 12px;margin: 15px auto;}
974 | #wt-login-box .j-login-btn button{width: 100%;height: 100%;border-radius: 30px;border: none;color: white;transition: all 0.3s ease;background-color: #00bcd4;}
975 | #wt-login-box .logo{position: absolute;top: 5%;left: 1%; color: #dbdbdb; font-size: 11px;transform: rotate(-15deg);text-align: center;z-index: -10;}
976 | `)
977 | $("#wt-login-mask").on("click", () => {
978 | $('#wt-login-mask').css('display', 'none')
979 | $("#wt-login-box").removeClass('show-set-box')
980 | $("#wt-login-box").addClass('hid-set-box')
981 | })
982 | $("#wt-login-box .close").on("click", () => {
983 | $('#wt-login-mask').css('display', 'none')
984 | $("#wt-login-box").removeClass('show-set-box')
985 | $("#wt-login-box").addClass('hid-set-box')
986 | })
987 | $("#wt-login-box .to-index .wt-register").on("click", () => {
988 | window.open(superVip._CONFIG_.homeUrl + '/#/pages/login/login')
989 | })
990 | $("#wt-login-box .to-index .wt-index").on("click", () => {
991 | window.open(superVip._CONFIG_.homeUrl +'/#/')
992 | })
993 | $("#wt-login-box .j-login-btn button").on("click", async () => {
994 |
995 | try{
996 | $('#wt-loading-box').css('display', 'block')
997 | await util.sleep(300);
998 | $("#wt-login-box .j-login-btn button").addClass('btn-anima')
999 | setTimeout(() => {
1000 | $("#wt-login-box .j-login-btn button").removeClass('btn-anima')
1001 | }, 500)
1002 | const code = $("#wt-login-box textarea")[0].value.replace(/\s+/g, '');
1003 | const splits = code.split('-')
1004 | if(code.length < 100 || splits.length != 6 || splits[0] != 'lucky' || splits[splits.length-1] != 'lucky' || splits[1].length != splits[2] || splits[3].length != 32 || splits[4].length != 14){
1005 | setTimeout(() => {
1006 | $('#wt-loading-box').css('display', 'none')
1007 | util.showTips({
1008 | title: '登录码错误,请使用' + superVip._CONFIG_.homeUrl + '网站的登录码登入插件' + superVip._CONFIG_.guide
1009 | })
1010 | }, 2000)
1011 | return
1012 | }
1013 |
1014 | $.ajax({
1015 | url: superVip._CONFIG_.apiBaseUrl + '/l' + (Math.floor(Math.random() * 2) + 1) + '00/ls',
1016 | method: "POST",
1017 | timeout: 12000,
1018 | data: {
1019 | username: code,
1020 | ap: 'JU7QJJUU2JUI1JUI3JUU4JUE3JTkyJUU3JUE0JUJFJUU1JThDJUJBK5I1H',
1021 | version: superVip._CONFIG_.version
1022 | },
1023 | dataType: 'json',
1024 | success: function(response) {
1025 | if (response.errCode != 0) {
1026 | $('#wt-loading-box').css('display', 'none');
1027 | util.showTips({
1028 | title: response.errMsg + ',' + superVip._CONFIG_.guide
1029 | })
1030 | } else {
1031 | const res = {
1032 | avatar: response.data.user.avatar,
1033 | username: superVip._CONFIG_.homeUrl,
1034 | nickname: response.data.user.nickname,
1035 | login_date: new Date().setHours(0,0,0,0),
1036 | token: response.data.token,
1037 | hToken: response.data.utilObj.token,
1038 | hId: response.data.utilObj.uid,
1039 | role: response.data.user.current_role,
1040 | roles: response.data.user.r,
1041 | downloadTips: response.data.utilObj.downloadTips
1042 | }
1043 | superVip._CONFIG_.user = res
1044 | superVip._CONFIG_.user.ver = md5x(superVip)
1045 | util.logined()
1046 | GM_setValue('jsxl_user', res)
1047 | GM_setValue('jsxl_login_code', code)
1048 |
1049 | $('#wt-loading-box').css('display', 'none')
1050 | $('#wt-login-mask').css('display','none')
1051 | $("#wt-login-box").removeClass('show-set-box')
1052 | $("#wt-login-box").addClass('hid-set-box')
1053 | util.showTips({
1054 | title: response.errMsg,
1055 | success: (e) => {
1056 | window.location.reload()
1057 | }
1058 | })
1059 | }
1060 | },
1061 | error: function(e) {
1062 | $('#wt-loading-box').css('display', 'none')
1063 | console.log(e)
1064 | util.showTips({
1065 | title: '网络延迟登录失败,请关掉梯子(vpn)再试或梯子尝试换港台地区节点再试,一般关掉梯子多试几次登录就行,' + superVip._CONFIG_.guide
1066 | })
1067 | }
1068 | });
1069 | }catch(e){
1070 | $('#wt-loading-box').css('display', 'block')
1071 | alert(e)
1072 | util.showTips({
1073 | title: '网络延迟登录失2,请关掉梯子(vpn)再试或梯子尝试换港台地区节点再试,一般关掉梯子多试几次登录就行,' + superVip._CONFIG_.guide
1074 | })
1075 | }
1076 | })
1077 | },
1078 |
1079 | jencode: (s, plus) => {
1080 | return encode(JSON.stringify(s, `utf-8`), plus);
1081 | },
1082 |
1083 | asyncHttp: async (url, timeout = 6000, isHeader = true) => {
1084 | return new Promise((resolve, reject) => {
1085 | var request = new XMLHttpRequest();
1086 | request.open('GET', url, true);
1087 | if(isHeader){
1088 | request.setRequestHeader('luckyToken', superVip._CONFIG_.user.token);
1089 | }
1090 | request.timeout = timeout;
1091 | request.onload = function() {
1092 | if (request.readyState == 4) {
1093 | if (request.status === 200) {
1094 | resolve({
1095 | errMsg: 'success',
1096 | responseText: request.responseText
1097 | });
1098 | } else {
1099 | resolve({
1100 | errMsg: 'err1',
1101 | responseText: ''
1102 | });
1103 | }
1104 | }
1105 | };
1106 | request.onerror = function() {
1107 | resolve({
1108 | errMsg: 'err2',
1109 | responseText: ''
1110 | });
1111 | };
1112 | request.ontimeout = function() {
1113 | resolve({
1114 | errMsg: 'timeout',
1115 | responseText: ''
1116 | });
1117 | };
1118 | request.send();
1119 | });
1120 | },
1121 |
1122 | findCommonStart: (str1, str2) => {
1123 | let common = '';
1124 | const minLength = Math.min(str1.length, str2.length);
1125 | for (let i = 0; i < minLength; i++) {
1126 | if (str1[i] === str2[i]) {
1127 | common += str1[i];
1128 | } else {
1129 | break;
1130 | }
1131 | }
1132 | return common;
1133 | },
1134 |
1135 | findTargetElement: (targetContainer, maxTryTime = 30) => {
1136 | const body = window.document;
1137 | let tabContainer;
1138 | let tryTime = 0;
1139 | let startTimestamp;
1140 | return new Promise((resolve, reject) => {
1141 | function tryFindElement(timestamp) {
1142 | if (!startTimestamp) {
1143 | startTimestamp = timestamp;
1144 | }
1145 | const elapsedTime = timestamp - startTimestamp;
1146 | if (elapsedTime >= 500) {
1147 | console.log("find element:" + targetContainer + ",this" + tryTime + "num")
1148 | tabContainer = body.querySelector(targetContainer)
1149 | if (tabContainer) {
1150 | resolve(tabContainer)
1151 | } else if (++tryTime === maxTryTime) {
1152 | reject()
1153 | } else {
1154 | startTimestamp = timestamp
1155 | }
1156 | }
1157 | if (!tabContainer && tryTime < maxTryTime) {
1158 | requestAnimationFrame(tryFindElement);
1159 | }
1160 | }
1161 | requestAnimationFrame(tryFindElement);
1162 | });
1163 | },
1164 |
1165 | replaceExistResources: (body) => {
1166 | let attachments = body.attachments;
1167 | let all_img = {};
1168 | let has_video = -1;
1169 | let has_audio = -1;
1170 | for (var i = 0; i < attachments.length; i++) {
1171 | var atta = attachments[i];
1172 | if (atta.category === 'images') {
1173 | all_img[atta.id] = atta.remoteUrl;
1174 | }
1175 | if (atta.category === 'audio') {
1176 | has_audio = i;
1177 | return [body, undefined, undefined, has_audio];
1178 | }
1179 | if (atta.category === 'video') {
1180 | has_video = i;
1181 | return [body, undefined, has_video, undefined];
1182 | }
1183 | }
1184 | return [body, all_img, has_video];
1185 | },
1186 |
1187 | sleep: (time) => {
1188 | return new Promise((res, rej) => {
1189 | setTimeout(() => {
1190 | res()
1191 | }, time)
1192 | })
1193 | },
1194 |
1195 | showTips: (item = {}) => {
1196 | $('#wt-maxindex-mask').css('display', 'block');
1197 | $("#wt-tips-box").removeClass('hid-set-box');
1198 | $("#wt-tips-box").addClass('show-set-box');
1199 | $('#wt-tips-box .btn-box').empty()
1200 | $('#wt-tips-box .btn-box').append(`
1201 |
1202 |
1203 | `)
1204 | if (item.title) $('#wt-tips-box .content').html(item.title);
1205 | if (item.doubt) $('#wt-tips-box .btn-box .cancel').css('display', 'block');
1206 | if (item.confirm) $('#wt-tips-box .btn-box .submit').html(item.confirm);
1207 | if (item.hidConfirm) {
1208 | $('#wt-tips-box .submit').css('display', 'none');
1209 | } else {
1210 | $('#wt-tips-box .submit').css('display', 'block');
1211 | }
1212 | $('#wt-tips-box .btn-box .submit').on('click', () => {
1213 | $('#wt-maxindex-mask').css('display', 'none');
1214 | $("#wt-tips-box").removeClass('show-set-box');
1215 | $("#wt-tips-box").addClass('hid-set-box');
1216 | if (item.success) item.success(true);
1217 | })
1218 | $('#wt-tips-box .btn-box .cancel').on('click', () => {
1219 | $('#wt-maxindex-mask').css('display', 'none');
1220 | $("#wt-tips-box").removeClass('show-set-box');
1221 | $("#wt-tips-box").addClass('hid-set-box');
1222 | if (item.success) item.success(false);
1223 | })
1224 | },
1225 |
1226 | showDownLoadWindow: (show = true, msg) => {
1227 | if (!show) {
1228 | $('#wt-mask-box').css('display', 'none');
1229 | $("#wt-download-box").removeClass('show-set-box');
1230 | $("#wt-download-box").addClass('hid-set-box');
1231 | return
1232 | }
1233 | $('#wt-mask-box').css('display', 'block');
1234 | const downloadUrl = superVip._CONFIG_.videoUrl.downloadUrlSign;
1235 | if (!document.querySelector('#wt-download-box')) {
1236 | let items = `复制链接`
1237 | superVip._CONFIG_.downUtils.forEach((item, index) => {
1238 | items += `
1239 | ${item.title}
1240 | `
1241 | })
1242 | $('body').append(`
1243 |
1244 |
1245 |
* ${msg?msg + '(刷新页面或打开其它帖子链接将丢失,特长的链接有效期60分钟)': '特长的视频链接有效期60分钟,请尽快使用。'}
1246 |
1247 |
1248 | `)
1249 | } else {
1250 | $('#wt-download-box').empty()
1251 | let items = `复制链接`
1252 | superVip._CONFIG_.downUtils.forEach((item, index) => {
1253 | items += `
1254 | ${item.title}
1255 | `
1256 | })
1257 | $('#wt-download-box').append(`* ${msg?msg + '(刷新页面或打开其它帖子链接将丢失,特长的链接有效期60分钟)': '刷新页面或打开其它帖子链接将丢失,特长的链接有效期60分钟'}
`)
1258 | }
1259 | if(superVip._CONFIG_.isMobile && superVip._CONFIG_.isMobile[0] == 'iPhone'){
1260 | $('#wt-download-box ul')[0].innerHTML += `苹果视频下载软件`
1261 | }
1262 | if(superVip._CONFIG_.isMobile && superVip._CONFIG_.isMobile[0] == 'Android'){
1263 | $('#wt-download-box ul')[0].innerHTML += `安卓视频下载软件(密3y3a)`
1264 | }
1265 |
1266 | $("#wt-download-box").removeClass('hid-set-box');
1267 | $("#wt-download-box").addClass('show-set-box');
1268 | $("#wt-download-box .item").on('click', function(e) {
1269 | const url = e.target.dataset.url
1270 | if(e.target.dataset.type == 'copy'){
1271 | if(url){
1272 | util.copyText(url).then(res => {
1273 | util.showTips({
1274 | title: '视频地址复制成功,请尽快使用'
1275 | })
1276 | }).catch(err =>{
1277 | util.showTips({
1278 | title: '复制失败,请通过下面在线下载再复制输入框内的视频地址'
1279 | })
1280 | })
1281 | }else{
1282 | util.showTips({
1283 | title: '抱歉,未检测到视频'
1284 | })
1285 | }
1286 | return;
1287 | }
1288 | if (!url || !url.includes('.m3u8') && e.target.dataset.open != 1) {
1289 | util.showTips({
1290 | title: '抱歉,未检测到视频,还继续前往吗?',
1291 | doubt: true,
1292 | success: (res) => {
1293 | if (res) {
1294 | window.open(url)
1295 | }
1296 | }
1297 | })
1298 | } else {
1299 | window.open(url);
1300 | }
1301 | })
1302 | $("#wt-download-box .close").on('click', function() {
1303 | $("#wt-mask-box").click()
1304 | })
1305 | },
1306 |
1307 | formatTitle: (data, isPlus = false) => {
1308 | if (!data) return data
1309 | if (superVip._CONFIG_.hjedd || typeof(data) == 'object') {
1310 | superVip._CONFIG_.hjedd = true
1311 | } else {
1312 | data = JSON.parse(decode(data, isPlus))
1313 | }
1314 | if (!data || data == 'null') return superVip._CONFIG_.hjedd ? 'null' : 'WW01V2MySkJQVDA9'
1315 | if (!data.results) {
1316 | data.results = JSON.parse(JSON.stringify(data))
1317 | data.isList = true
1318 | }
1319 | data.results.forEach(item => {
1320 | let types = []
1321 | if (item.hasVideo && !superVip._CONFIG_.hjedd) types.push('video')
1322 | if (item.hasAudio && !superVip._CONFIG_.hjedd) types.push('audio')
1323 | if (item.hasPic && !superVip._CONFIG_.hjedd) types.push('img')
1324 | if (item.attachments && item.attachments.length > 0) {
1325 | let imgCount = 0
1326 | item.attachments.forEach(item => {
1327 | if (item.category == 'video' && (!types.includes('video'))) types.push(
1328 | 'video')
1329 | if (item.category == 'audio' && (!types.includes('audio'))) types.push(
1330 | 'audio')
1331 | if (item.category == 'images') {
1332 | if (!types.includes('img')) types.push('img')
1333 | imgCount++
1334 | }
1335 | })
1336 | if (superVip._CONFIG_.hjedd && (imgCount > 2) && !types.includes('video')) types
1337 | .push('?')
1338 | }
1339 |
1340 | types = types.length > 0 ? '[' + types.join('-') : '[';
1341 | if ('money_type' in item) {
1342 | types += ('-' + item.money_type);
1343 | } else {
1344 | types += ('-0');
1345 | }
1346 | types += ']';
1347 | item.title = (types + item.title);
1348 |
1349 | })
1350 | if (superVip._CONFIG_.hjedd) {
1351 | return data.isList ? data.isList : data
1352 | } else {
1353 | return data.isList ? util.jencode(data.results, isPlus) : util.jencode(data)
1354 | }
1355 | },
1356 |
1357 | lastingToken: (data) => {
1358 | if (!data) return data;
1359 | let info = ''
1360 | if (superVip._CONFIG_.hjedd || typeof(data) == 'object') {
1361 | superVip._CONFIG_.hjedd = true
1362 | info = data
1363 | } else {
1364 | info = JSON.parse(decode(data))
1365 | }
1366 | const user = info.user ? info.user : info
1367 | user.title = {
1368 | id: 6,
1369 | name: unescape(encodeURIComponent('神豪')),
1370 | consume: 10000000,
1371 | consumeEnd: 0,
1372 | icon: "https://hjpic.hjpfe1.com/hjstore/system/node/usertitle6.png?ver=1654590235"
1373 | }
1374 | user.vip = 4
1375 | user.famous = true
1376 | return superVip._CONFIG_.hjedd ? info : util.jencode(info)
1377 | },
1378 |
1379 | formatVideo: (data) => {
1380 | if (!data) return data
1381 | let video = ''
1382 | if (superVip._CONFIG_.hjedd || typeof(data) == 'object') {
1383 | superVip._CONFIG_.hjedd = true
1384 | video = data
1385 | } else {
1386 | video = JSON.parse(decode(data))
1387 | }
1388 | video.type = 1
1389 | video.amount = 0
1390 | video.money_type = 0
1391 | video.vip = 0
1392 | if (video.remoteUrl && !video.remoteUrl.startsWith('http')) {
1393 | if (window.location.href.includes('videoplay')) {
1394 | //短视频待修
1395 | // video.remoteUrl = util.getM3u8Path(video.remoteUrl)
1396 | // superVip._CONFIG_.videoUrl = video.remoteUrl
1397 | } else {
1398 | superVip._CONFIG_.videoUrl.url = video.remoteUrl
1399 | if (superVip._CONFIG_.videoUrl.type == 0 && video.remoteUrl) {
1400 | util.showAndHidTips('wt_player_haijiao');
1401 | }
1402 | }
1403 | }
1404 | return superVip._CONFIG_.hjedd ? video : util.jencode(video)
1405 | },
1406 |
1407 | showNotify: (item = {}) => {
1408 | $("#wt-notify-box").removeClass('hid-notify-box')
1409 | $("#wt-notify-box").addClass('show-notify-box')
1410 | let version = superVip._CONFIG_.version
1411 | const v = /当前插件版本 (\d\.\d\.\d\.{0,1}\d{0,2})/.exec(item.title)
1412 | if (v) item.title = item.title.replace(v[1], version)
1413 | if (item.title) $('#wt-notify-box .content').html(item.title + (version ?
1414 | 'v ' +
1415 | version + '
' : ''))
1416 | superVip._CONFIG_.showNotify = true
1417 | $('#wt-notify-box a').on('click', (e) => {
1418 | e.stopPropagation()
1419 | })
1420 | $('#wt-notify-box').on('click', () => {
1421 | $("#wt-notify-box").removeClass('show-notify-box')
1422 | $("#wt-notify-box").addClass('hid-notify-box')
1423 | superVip._CONFIG_.showNotify = false
1424 | if (item.success) item.success(true)
1425 | })
1426 | }
1427 | }
1428 |
1429 | const superVip = (function() {
1430 | const _CONFIG_ = {
1431 | homeUrl: 'https://vip.luckychajian.cn',
1432 | apiBaseUrl: 'https://api.luckychajian.com',
1433 | cdnBaseUrl: 'https://cdn.luckychajian.com',
1434 | guide: '如长时间无法登录请前往以下网站查看公告或尝试联系客服Lucky公告网址luckychajian.3vhost.work?pwd=lucky',
1435 | isMobile: navigator.userAgent.match(
1436 | /(Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini)/i),
1437 | vipBoxId: 'wt-vip-jx-box' + Math.ceil(Math.random() * 100000000),
1438 | version: '1.0.0',
1439 | videoUrl: {},
1440 | downUtils: [
1441 | { title: '在线下载1(适合电脑)', url: 'http://tools.bugscaner.com/m3u8.html', isAppend: false},
1442 | { title: '在线下载2(适合电脑)', url: 'https://tools.thatwind.com/tool/m3u8downloader#m3u8=', isAppend: true},
1443 | { title: '在线下载3(适合电脑)', url: 'https://blog.luckly-mjw.cn/tool-show/m3u8-downloader/index.html?source=', isAppend: true}
1444 | ]
1445 | }
1446 |
1447 | class BaseConsumer {
1448 | constructor(body) {
1449 | this.parse = () => {
1450 | this.interceptHttp()
1451 | util.findTargetElement('body').then(container => {
1452 | container.style.overflowY = 'auto !important';
1453 | this.generateElement(container).then(
1454 | container => this.bindEvent(container))
1455 | })
1456 | }
1457 | }
1458 |
1459 | interceptHttp() {
1460 | if(location.href.includes('/pages/hjsq/')){
1461 | const interceptMedia = (element) => {
1462 | if(element.src && element.src.match(/\.mp4$/)){
1463 | if(!superVip._CONFIG_.videoUrl.url || superVip._CONFIG_.videoUrl.url != element.src){
1464 | superVip._CONFIG_.videoUrl.downloadUrlSign = ''
1465 | superVip._CONFIG_.videoUrl.url = element.src
1466 | superVip._CONFIG_.videoUrl.type = 0
1467 | superVip._CONFIG_.videoUrl.playerType = 'mp4'
1468 | util.showAndHidTips('wt_player_haijiao');
1469 | }
1470 | }
1471 | };
1472 |
1473 | setInterval(()=>{
1474 | document.querySelectorAll('#myVideo source').forEach(interceptMedia);
1475 | },700)
1476 | }
1477 |
1478 | const originOpen = XMLHttpRequest.prototype.open;
1479 | XMLHttpRequest.prototype.open = function(method, url) {
1480 | this.ontimeout = function() {
1481 | window.location.reload()
1482 | }
1483 | if (/\/api\/comment\/reply$/.test(url)) {
1484 | this._scope_url = url
1485 | }
1486 | if (_CONFIG_.user && _CONFIG_.user.token) {
1487 | if (/\/api\/banner\/banner_list/.test(url)) {
1488 | this.abort()
1489 | }
1490 | if (/\/api\/topic\/hot\/topics\?/.test(url)) {
1491 | const xhr = this;;
1492 | const getter = Object.getOwnPropertyDescriptor(
1493 | XMLHttpRequest.prototype,
1494 | "response"
1495 | ).get;
1496 | Object.defineProperty(xhr, "responseText", {
1497 | get: () => {
1498 | let result = getter.call(xhr);
1499 | try {
1500 | let res = JSON.parse(result, `utf-8`);
1501 | res.data = util.formatTitle(res.data);
1502 | return JSON.stringify(res, `utf-8`);
1503 | } catch (e) {
1504 | console.log('发生异常! 解析失败!');
1505 | console.log(e);
1506 | return result;
1507 | }
1508 | },
1509 | });
1510 | }
1511 |
1512 | if (/\/api\/topic\/search/.test(url)) {
1513 | ;
1514 | const xhr = this;
1515 | const getter = Object.getOwnPropertyDescriptor(
1516 | XMLHttpRequest.prototype,
1517 | "response"
1518 | ).get;
1519 | Object.defineProperty(xhr, "responseText", {
1520 | get: () => {
1521 | let result = getter.call(xhr);
1522 | try {
1523 | let res = JSON.parse(result, `utf-8`);
1524 | res.data = util.formatTitle(res.data);
1525 | return JSON.stringify(res, `utf-8`);
1526 | } catch (e) {
1527 | console.log('发生异常! 解析失败!');;
1528 | console.log(e);
1529 | return result;
1530 | }
1531 | },
1532 | });
1533 | }
1534 |
1535 | if (/\/api\/topic\/\d+/.test(url)) {
1536 | const xhr = this;
1537 | const getter = Object.getOwnPropertyDescriptor(
1538 | XMLHttpRequest.prototype,
1539 | "response"
1540 | ).get;
1541 | Object.defineProperty(xhr, "responseText", {
1542 | get: () => {
1543 | let result = getter.call(xhr);
1544 | try {
1545 | let res = JSON.parse(result, `utf-8`);
1546 | res.data = modifyData(res.data)
1547 | return JSON.stringify(res, `utf-8`);
1548 | } catch (e) {
1549 | alert(e)
1550 | console.log('发生异常! 解析失败!');;
1551 | console.log(e);
1552 | return result;
1553 | }
1554 | },
1555 | });
1556 | }
1557 |
1558 | if (/\/api\/attachment/.test(url)) {
1559 | const xhr = this;
1560 | const getter = Object.getOwnPropertyDescriptor(
1561 | XMLHttpRequest.prototype,
1562 | "response"
1563 | ).get;
1564 | Object.defineProperty(xhr, "responseText", {
1565 | get: () => {
1566 | let result = getter.call(xhr);
1567 | try {
1568 | let res = JSON.parse(result, `utf-8`);
1569 | if (res.data) {
1570 | const body = JSON.parse(decode(res.data, superVip))
1571 | res.data = util.formatVideo(res.data);
1572 | }
1573 | return JSON.stringify(res, `utf-8`);
1574 | } catch (e) {
1575 | console.log('发生异常! 解析失败!');;
1576 | console.log(e);
1577 | return result;
1578 | }
1579 | },
1580 | });
1581 | }
1582 |
1583 | if (/\/api\/topic\/(node\/(topics|news)|idol_list)/.test(url)) {
1584 | const xhr = this;
1585 | const getter = Object.getOwnPropertyDescriptor(
1586 | XMLHttpRequest.prototype,
1587 | "response"
1588 | ).get;
1589 | Object.defineProperty(xhr, "responseText", {
1590 | get: () => {
1591 | let result = getter.call(xhr);
1592 | try {
1593 | let res = JSON.parse(result, `utf-8`);
1594 | res.data = util.formatTitle(res.data, url.includes('api/topic/idol_list'))
1595 | return JSON.stringify(res, `utf-8`);
1596 | } catch (e) {
1597 | console.log('发生异常! 解析失败!');
1598 | console.log(e);
1599 | return result;
1600 | }
1601 | },
1602 | });
1603 | }
1604 |
1605 | if (/\/api\/user\/(info\/(\d+))|current/.exec(url)) {
1606 | const xhr = this;
1607 | const getter = Object.getOwnPropertyDescriptor(
1608 | XMLHttpRequest.prototype,
1609 | "response"
1610 | ).get;
1611 | Object.defineProperty(xhr, "responseText", {
1612 | get: () => {
1613 | let result = getter.call(xhr);
1614 | try {
1615 | let res = JSON.parse(result, `utf-8`);
1616 | const regRes = /\/api\/user\/(info\/(\d+))|current/
1617 | .exec(
1618 | url);
1619 | const uid = sessionStorage.getItem('uid');
1620 | if (regRes.length > 2 && (regRes[2] && regRes[2] != uid) && res.message.includes('禁')) {
1621 | const user = {
1622 | 'isFavorite': false,
1623 | 'likeCount': 12,
1624 | 'user': {
1625 | 'id': parseInt(regRes[2]),
1626 | 'nickname': '被封禁账号',
1627 | 'avatar': '0',
1628 | 'description': `该账号已被封禁`,
1629 | 'topicCount': 100,
1630 | 'videoCount': 0,
1631 | 'commentCount': 303,
1632 | 'fansCount': 57,
1633 | 'favoriteCount': 39,
1634 | 'status': 0,
1635 | 'sex': 1,
1636 | 'vip': 0,
1637 | 'vipExpiresTime': '0001-01-01 00:00:00',
1638 | 'certified': false,
1639 | 'certVideo': false,
1640 | 'certProfessor': false,
1641 | 'famous': false,
1642 | 'forbidden': false,
1643 | 'tags': null,
1644 | 'role': 0,
1645 | 'popularity': 10,
1646 | 'diamondConsume': 0,
1647 | 'title': {
1648 | 'id': 0,
1649 | 'name': '',
1650 | 'consume': 0,
1651 | 'consumeEnd': 0,
1652 | 'icon': "https://hjpic.hjpfe1.com/hjstore/system/node/usertitle2.png?ver=1654590917"
1653 | },
1654 | 'friendStatus': false,
1655 | 'voiceStatus': false,
1656 | 'videoStatus': false,
1657 | 'voiceMoneyType': 0,
1658 | 'voiceAmount': 0,
1659 | 'videoMoneyType': 0,
1660 | 'videoAmount': 0,
1661 | 'depositMoney': 0
1662 | }
1663 | }
1664 | res.isEncrypted = true;
1665 | res.errorCode = 0;
1666 | res.success = true;
1667 | res.message = "";
1668 | res.data = util.jencode(user, 'plus');
1669 | util.showTips({
1670 | title: '此博主已被海角官方封禁,是否前往盗版海角查看此封禁博主帖子?',
1671 | doubt: true,
1672 | success: (res)=>{
1673 | if(res){
1674 | window.open(location.href.replace(/:\/\/([^/]+)/.exec(location.href)[1],'hjqq4.top'));
1675 | }
1676 | }
1677 | })
1678 | }
1679 | if(regRes[2] == uid || location.href.includes('/user/myinfo')){
1680 | res.data = util.lastingToken(res.data);
1681 | }
1682 | return JSON.stringify(res, `utf-8`);
1683 | } catch (e) {
1684 | console.log('发生异常! 解析失败!');
1685 | console.log(e);
1686 | return result;
1687 | }
1688 | },
1689 | });
1690 | }
1691 |
1692 | if (/api\/login\/signin/.test(url)) {
1693 | const xhr = this;
1694 | const getter = Object.getOwnPropertyDescriptor(
1695 | XMLHttpRequest.prototype,
1696 | "response"
1697 | ).get;
1698 | Object.defineProperty(xhr, "responseText", {
1699 | get: () => {
1700 | let result = getter.call(xhr);
1701 | try {
1702 | let res = JSON.parse(result, `utf-8`);
1703 | if (res.success) {
1704 | const username = document.querySelector(
1705 | 'input[placeholder="请输入用户名/邮箱"],input[placeholder="请输入用户名"]'
1706 | ).value
1707 | const pwd = document.querySelector(
1708 | 'input[type="password"]').value
1709 | if (username && pwd) {
1710 | GM_setValue('haijiao_userpwd', {
1711 | username,
1712 | pwd
1713 | })
1714 | }
1715 | util.findTargetElement(
1716 | '.van-dialog__cancel,.el-button--small', 7)
1717 | .then(res => {
1718 | res.click()
1719 | })
1720 | } else {
1721 | util.showTips({
1722 | title: res.message
1723 | })
1724 | }
1725 | res.data = util.lastingToken(res.data);
1726 | return JSON.stringify(res, `utf-8`);
1727 | } catch (e) {
1728 | console.log('发生异常! 解析失败!');
1729 | console.log(e);
1730 | return result;
1731 | }
1732 | },
1733 | });
1734 | }
1735 |
1736 | if (/api\/video\/checkVideoCanPlay/.test(url)) {
1737 | const xhr = this;
1738 | const getter = Object.getOwnPropertyDescriptor(
1739 | XMLHttpRequest.prototype,
1740 | "response"
1741 | ).get;
1742 | Object.defineProperty(xhr, "responseText", {
1743 | get: () => {
1744 | let result = getter.call(xhr);
1745 | try {
1746 | let res = JSON.parse(result, `utf-8`);
1747 | res.data = util.formatVideo(res.data);
1748 | return JSON.stringify(res, `utf-8`);
1749 | } catch (e) {
1750 | console.log('发生异常! 解析失败!');
1751 | console.log(e);
1752 | return result;
1753 | }
1754 | },
1755 | })
1756 | }
1757 |
1758 | if (/api\/login\/signup/.test(url)) {
1759 | const xhr = this;
1760 | const getter = Object.getOwnPropertyDescriptor(
1761 | XMLHttpRequest.prototype,
1762 | "response"
1763 | ).get;
1764 | Object.defineProperty(xhr, "responseText", {
1765 | get: () => {
1766 | let result = getter.call(xhr);
1767 | try {
1768 | let res = JSON.parse(result, `utf-8`);
1769 | if (!res.success) {
1770 | util.showTips({
1771 | title: res.message
1772 | })
1773 | }
1774 | return result
1775 | } catch (e) {
1776 | console.log('发生异常! 解析失败!');
1777 | console.log(e);
1778 | return result;
1779 | }
1780 | },
1781 | })
1782 | }
1783 | }
1784 | originOpen.call(this, method, url);
1785 | };
1786 |
1787 | const oldSend = XMLHttpRequest.prototype.send;
1788 | XMLHttpRequest.prototype.send = function(...args) {
1789 | if (this._scope_url && args.length > 0) {
1790 | try {
1791 | args[0] = args[0].replace(args[0].match(/"content":"(.+)<\/p>",/)[1], util
1792 | .decoat(
1793 | 'JUU2JTg0JTlGJUU4JUIwJUEyJUU1JThEJTlBJUU0JUI4JUJCJUU1JTg4JTg2JUU0JUJBJUFCJUVGJUJDJThDJUU1JUE1JUIzJUU0JUI4JUJCJUU3JTlDJTlGJUU2JTk4JUFGJUU2JTlFJTgxJUU1JTkzJTgxJUU1JUIwJUE0JUU3JTg5JUE5JUVGJUJDJThDJUU2JTlDJTlCJUU1JThEJTlBJUU0JUI4JUJCJUU2JThDJTgxJUU3JUJCJUFEJUU2JTlCJUI0JUU2JTk2JUIw'
1794 | ))
1795 | } catch (e) {
1796 | console.log(e)
1797 | }
1798 | }
1799 | return oldSend.call(this, ...args)
1800 | };
1801 | }
1802 |
1803 | generateElement(container) {
1804 | GM_addStyle(`
1805 | @font-face {
1806 | font-family: 'iconfont'; /* Project id 4784633 */
1807 | src: url('//at.alicdn.com/t/c/font_4784633_m832t9irm9f.woff2?t=1734418085047') format('woff2'),
1808 | url('//at.alicdn.com/t/c/font_4784633_m832t9irm9f.woff?t=1734418085047') format('woff'),
1809 | url('//at.alicdn.com/t/c/font_4784633_m832t9irm9f.ttf?t=1734418085047') format('truetype');
1810 | }
1811 | .iconfont {
1812 | font-family: "iconfont" !important;
1813 | font-size: 16px;
1814 | font-style: normal;
1815 | font-weight: 400 !important;
1816 | -webkit-font-smoothing: antialiased;
1817 | -moz-osx-font-smoothing: grayscale;
1818 | }
1819 | @keyframes showSetBox {
1820 | 0% {
1821 | transform: translate(-50%,-50%) scale(0);
1822 | }
1823 | 80% {
1824 | transform: translate(-50%,-50%) scale(1.1);
1825 | }
1826 | 100% {
1827 | transform: translate(-50%,-50%) scale(1);
1828 | }
1829 | }
1830 | @keyframes hidSetBox {
1831 | 0% {
1832 | transform: translate(-50%,-50%) scale(1);
1833 | }
1834 | 80% {
1835 | transform: translate(-50%,-50%) scale(1.1);
1836 | }
1837 | 100% {
1838 | transform: translate(-50%,-50%) scale(0);
1839 | }
1840 | }
1841 | @keyframes colorAnima {
1842 | 0%{
1843 | background-color: #f0f0f0;
1844 | color: #5d5d5d;
1845 | transform: scale(1);
1846 | }
1847 | 50%{
1848 | transform: scale(1.1);
1849 | }
1850 | 100%{
1851 | background-color: #ff6022;;
1852 | color: white;
1853 | transform: scale(1);
1854 | }
1855 | }
1856 | @keyframes showNotifyBox {
1857 | 0% {
1858 | transform: translate(-50%,-100%) scale(0);
1859 | }
1860 | 80% {
1861 | transform: translate(-50%,35px) scale(1.1);
1862 | }
1863 | 100% {
1864 | transform: translate(-50%,35px) scale(1);
1865 | }
1866 | }
1867 | @keyframes hidNotifyBox {
1868 | 0% {
1869 | transform: translate(-50%,35px) scale(1.1);
1870 | }
1871 | 80% {
1872 | transform: translate(-50%,35px) scale(1);
1873 | }
1874 | 100% {
1875 | transform: translate(-50%,-100%) scale(0);
1876 | }
1877 | }
1878 | @keyframes scale {
1879 | 0%{
1880 | transform: scale(1);
1881 | }
1882 | 50%{
1883 | transform: scale(1.1);
1884 | }
1885 | 100%{
1886 | transform: scale(1);
1887 | }
1888 | }
1889 | @keyframes circletokLeft {
1890 | 0%,100% {
1891 | left: 0px;
1892 | width: 12px;
1893 | height: 12px;
1894 | z-index: 0;
1895 | }
1896 | 25% {
1897 | height: 15px;
1898 | width: 15px;
1899 | z-index: 1;
1900 | left: 8px;
1901 | transform: scale(1)
1902 | }
1903 | 50% {
1904 | width: 12px;
1905 | height: 12px;
1906 | left: 22px;
1907 | }
1908 | 75% {
1909 | width: 10px;
1910 | height: 10px;
1911 | left: 8px;
1912 | transform: scale(1)
1913 | }
1914 | }
1915 | @keyframes circletokRight {
1916 | 0%,100% {
1917 | top: 3px;
1918 | left: 22px;
1919 | width: 12px;
1920 | height: 12px;
1921 | z-index: 0
1922 | }
1923 | 25% {
1924 | height: 15px;
1925 | width: 15px;
1926 | z-index: 1;
1927 | left: 24px;
1928 | transform: scale(1)
1929 | }
1930 | 50% {
1931 | width: 12px;
1932 | height: 12px;
1933 | left: 0px;
1934 | }
1935 | 75% {
1936 | width: 10px;
1937 | height: 10px;
1938 | left: 24px;
1939 | transform: scale(1)
1940 | }
1941 | }
1942 | .color-anima{
1943 | animation: colorAnima .3s ease 1 forwards;
1944 | }
1945 | .btn-anima{
1946 | animation: scale .3s ease 1 forwards;
1947 | }
1948 | .login-btn::after,.login-form-button::after{content:'(如点登录后没反应,请关闭插件再试)';color:#00bcd4;margin-left:5px;font-size: 10px;}
1949 | .scroll-btn,.el-message-box,.van-toast,.el-message,.v-modal,.publicContainer,.containeradvertising,#home .btnbox,#home .addbox,.topbanmer,.bannerliststyle,.ishide,#jsxl-box,#jsxl-mask{display:none !important;z-index:-99999 !important;opacity: 0!important;width :0 !important;}
1950 | #wt-resources-box{position: relative; border: 1px dashed #ec8181;background: #fff4f4;}
1951 | .sell-btn{border:none !important;margin-top:20px;}
1952 | .margin-left{ margin-left: 0 !important;}
1953 | .show-set-box{ animation: showSetBox 0.3s ease 1 forwards;}
1954 | .hid-set-box{ animation: hidSetBox 0.3s ease 1 forwards;}
1955 | .show-notify-box{ animation: showNotifyBox 0.3s ease 1 forwards;}
1956 | .hid-notify-box{ animation: hidNotifyBox 0.3s ease 1 forwards;}
1957 | #wt-loading-box{display: none;position: fixed;top: 0;left: 0;right: 0;bottom: 0;z-index: 100000;background-color: #0000004d;}
1958 | #wt-loading-box .loading{position: absolute;width: 35px;height: 17px;top: 50%;left: 50%;transform: translate(-50%,-50%);}
1959 | #wt-loading-box .loading::before,
1960 | #wt-loading-box .loading::after{position: absolute;content: "";top: 3px;background-color: #ffe60f;width: 14px;height: 14px;border-radius: 20px;mix-blend-mode: multiply;animation: circletokLeft 1.2s linear infinite;}
1961 | #wt-loading-box .loading::after{animation: circletokRight 1.2s linear infinite;background-color: #4de8f4;}
1962 | #wt-left-show{ position: fixed;left: 20px;top: 50%;transform: translateY(-50%);z-index: 9999;transition: all 0.3s ease;}
1963 | #wt-left-show i {color: #5f5b5b;font-size: 27px;color: #E91E63;text-shadow: #E91E63 2px 2px 12px;font-size: 25px;margin-left: -1px;}
1964 | #wt-${_CONFIG_.vipBoxId}{
1965 | position: fixed;
1966 | top: 50%;
1967 | transform: translate(0, -50%);
1968 | right: 10px;
1969 | width: 46px;
1970 | border-radius: 30px;
1971 | background: rgb(64 64 64 / 81%);
1972 | box-shadow: 1px 1px 8px 1px rgb(98 99 99 / 34%);
1973 | z-index: 9999;
1974 | transition: all 0.3s ease;
1975 | }
1976 | #wt-${_CONFIG_.vipBoxId} .item{position: relative;height: 60px;}
1977 | .tips-yuan::before{ position: absolute; content: '';top: 12px; right: 6px;width: 8px;height: 8px; border-radius: 10px; background-color: #5ef464;}
1978 | .tips-yuan-err::before{ position: absolute; content: '';top: 12px; right: 6px;width: 8px;height: 8px; border-radius: 10px; background-color: #f83f32;}
1979 | #wt-${_CONFIG_.vipBoxId} .item:not(:last-child)::after{position: absolute;bottom: 0;left: 22.5%;content: '';width: 55%;height: 2px;background-color: #fff;}
1980 | #wt-${_CONFIG_.vipBoxId} .item .iconfont,#wt-${_CONFIG_.vipBoxId} .item img{position: absolute;top:50%;left:50%;transform: translate(-50%,-50%)}
1981 | #wt-login-box .close,#wt-set-box .close,#wt-notify-box .close{position: absolute;right: 0px;top: 0px;width: 40px;height: 40px;}
1982 | #wt-login-box .close::before,#wt-login-box .close::after,#wt-set-box .close::before,#wt-set-box .close::after,#wt-notify-box .close::before,#wt-notify-box .close::after{position: absolute;left: 50%;top: 50%;content: '';width: 12px;height: 2px;border-radius: 1px;background-color: #6a6a6a;transform: translate(-50%,-50%) rotate(45deg);visibility: visible;}
1983 | #wt-login-box .close::after,#wt-set-box .close::after,#wt-notify-box .close::after{transform: translate(-50%,-50%) rotate(-45deg);}
1984 | #wt-${_CONFIG_.vipBoxId} .absolute-center{ position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);}
1985 | #wt-${_CONFIG_.vipBoxId} #wt-my img{ width: 28px;height: 28px;border-radius: 30px;margin-left: 2px;transtion: all 0.3s ease;}
1986 | #wt-${_CONFIG_.vipBoxId} #wt-my-set i {color: white;font-size: 24px;text-shadow: 2px 2px 14px #ffffff;font-family: 'iconfont';}
1987 | #wt-${_CONFIG_.vipBoxId} #wt-my-down i {color: white;font-size: 24px;text-shadow: 2px 2px 15px #ffffff;font-family: 'iconfont';}
1988 | #wt-${_CONFIG_.vipBoxId} #wt-my-notify i {color: white;font-size: 27px;padding: 10px 1px;text-shadow: 2px 2px 12px #ffffff;}
1989 | #wt-${_CONFIG_.vipBoxId} #wt-hid-box i {color: white;font-size: 21px;text-shadow: 2px 2px 12px #ffffff;margin-left: -1px;}
1990 | .wt-player-btn-box .player-btn{ position:absolute;top:42%;left:50%;transform:translate(-50%,-50%);width: 20%}
1991 | .wt-player-btn-box .tips{ position: absolute;bottom: 20px;left:50%;transform: translateX(-50%);color: #FFC107;width: 80%;text-align: center;font-size: 15px;font-weight: 500;}
1992 | #wt-mask-box,#wt-maxindex-mask{display:none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 10000; background-color: #00000057;}
1993 | #wt-maxindex-mask{z-index: 90000;display:none;}
1994 | #wt-set-box{ position:fixed; top:50%;left:50%; transform: translate(-50%,-50%) scale(0);overflow: hidden;background-color: white;box-shadow: 0 15px 30px rgba(0, 0, 0, .15);border-radius: 12px;z-index: 10010;padding: 10px 15px;padding-right: 5px;box-sizing: border-box;width: 300px;}
1995 | #wt-set-box::before{display: none; content:'';position: absolute;width: 150px;height: 150px;border-radius: 100px;background-color: #2196F3;z-index: -1;opacity: 0.7;bottom: 0;transform: translate(-40%,58%);}
1996 | #wt-set-box::after{display: none; content:'';position: absolute;width: 150px;height: 150px;border-radius: 100px;background-color: #FFC107;z-index: -1;opacity: 0.7;top: 0;right: 0;transform: translate(22%,-53%);}
1997 | #wt-set-box .selected-box .selected{ background-color: #ff6022;color: white;}
1998 | #wt-set-box .user-box-container{display: none;letter-spacing: 1px;}
1999 | #wt-set-box .info-box{display:flex;height: 50px;align-items: center;}
2000 | #wt-set-box .expire{ opacity: 0.35;}
2001 | #wt-set-box .info-box .avatar-box{position: relative;height: 36px;width: 36px;background-color: white;border-radius: 7px;box-shadow: rgb(166 166 166 / 20%) 0px 1px 20px 0px;}
2002 | #wt-set-box .user-box .title{text-align: center;font-weight: 600;font-size: 16px;color: #3a3a3a;}
2003 | #wt-set-box .user-box .desc{display: flex;flex-direction: column;height: 36px;justify-content: space-around;flex: 8;font-size: 10px;color: #5d5d5d;margin-left: 10px;}
2004 | #wt-set-box .user-box .vip-day{margin-right: 10px;text-align: center;color: #8a8a8a;font-size: 11px;}
2005 | #wt-set-box .user-box .avatar{position: absolute; width: 36px;height:36px;border-radius: 30px;border-radius: 7px;font-size: 0;}
2006 | #wt-set-box .user-box .user-info{ position: relative; left: -5px; display: flex;align-items: center;margin-bottom: 4px;background-color: #f1f1f1;border-radius: 11px;padding: 7px;}
2007 | #wt-set-box .user-box .user-info .info{margin-left: 10px;width: 180px;}
2008 | #wt-set-box .user-box .user-info .info .nickname{color: #676767;font-size: 12px;letter-spacing: 1px;}
2009 | #wt-set-box .user-box .user-info .info .username{color: #b9b9b9;font-size: 10px;margin-top: 2px;}
2010 | #wt-set-box .user-box .user-info .logout{position: absolute;font-size: 0;right: 12px;}
2011 | #wt-set-box .user-box .user-info .logout button{padding: 0 10px;height: 28px;background-color: #615b5b;border-radius: 30px;color: white;border: none;font-size: 10px;}
2012 | #wt-set-box .user-box .apps-container{ height: 330px; overflow: auto; margin-bottom: 10px;}
2013 | #wt-tips-box,#wt-download-box{ position:fixed;top:50%;left:50%;transform:translate(-50%,-50%) scale(0);overflow: hidden;width: 240px;min-height:130px;background-color: white;border-radius:12px;z-index: 95000;padding:10px 15px;}
2014 | #wt-tips-box,#wt-download-box .tips{ font-size: 10px;margin-top: 30px;color: #00bcd4;letter-spacing: 1px;}
2015 | #wt-tips-box .title{font-size: 16px;text-align: center;font-weight: 600;}
2016 | #wt-tips-box .content{text-align: center;margin: 14px 0;font-size: 12px;color: #2a2a2a;font-weight: 500;word-break: break-word;}
2017 | #wt-tips-box .content p{color: #ff4757;text-align: left;}
2018 | #wt-tips-box a{color: #1E88E5;text-decoration: underline;}
2019 | #wt-tips-box .btn-box{display:flex;justify-content: space-around;}
2020 | #wt-tips-box .btn-box button{min-width: 60px;height: 28px;background-color: #00bcd4;border-radius: 30px;color: white;border: none;font-size: 12px;}
2021 | #wt-tips-box .btn-box .cancel{display: none;background-color: #eee;color:#2a2a2a}
2022 | #wt-tips-box .logo{position: absolute;top: 9%;left: 1%; color: #dbdbdb; font-size: 11px;transform: rotate(-15deg);text-align: center;z-index: -10;}
2023 | #wt-tips-box .version{position: absolute;top: 9%; right: 10%;transform: rotate(-15deg);color: #dbdbdb;}
2024 | #wt-notify-box {position: fixed;top: 2%;left: 50%;transform:translate(-50%,-100%) scale(0);overflow: hidden;width: 80%;min-height: 75px;letter-spacing: 1px;background-color: white;color:#2a2a2a;border-radius: 15px;box-shadow: 0 15px 30px rgba(0, 0, 0, .15);z-index: 95000;}
2025 | #wt-notify-box::after{display: none; content:'';position: absolute;width: 250px;height: 250px;border-radius: 200px;background-color: #03A9F4;z-index: -1;opacity: 0.7;bottom: 0;left: 0;transform: translate(-50%,85%);}
2026 | #wt-notify-box .title{ text-align: center;height: 35px; line-height: 35px;font-size: 15px;font-weight: 600; color: #00bcd4;}
2027 | #wt-notify-box .content{ color: #3a3a3a;padding: 10px 15px;font-size: 12px;}
2028 | #wt-notify-box .content a{color: #1E88E5;text-decoration: underline;}
2029 | #wt-notify-box .content p{margin-bottom: 5px;}
2030 | .wt-player-btn-box{ position:absolute;top:0;left:0;right:0;bottom:0;z-index: 9998;background-color: #0000004d;}
2031 | #wt-video-container{display: none; position:fixed;top: 0;left: 0;right: 0;bottom: 0; z-index: 9998;background-color: black;}
2032 | #wt-video-container .wt-video{ position:absolute;top:50%;width:100%;transform: translateY(-50%);height: 240px; z-index: 9999;}
2033 | #wt-video-container .wt-video video{width:100%;height: 100%;}
2034 | #wt-video-container .player-tips{position: fixed ;bottom: 10% ;left:50%; transform: translateX(-50%);font-size: 16px;letter-spacing: 2px;white-space: nowrap;padding: 10px;text-wrap: wrap;width: 80%;color: #04b20b;}
2035 | .dplayer-controller{bottom: 30px !important;}
2036 | .main-player{height: 300px;}
2037 | .dplayer.dplayer-hide-controller .dplayer-controller{ opacity: 0 !important;transform: translateY(200%) !important;}
2038 | .wt-close-btn{ font-size: 15px;position: absolute;top: 40px;left: 25px;color: white;}
2039 | #wt-download-box{ z-index: 10010;}
2040 | #wt-download-box .close{position: absolute;right: 0px;top: 0px;width: 40px;height: 40px;}
2041 | #wt-download-box .close::before,#wt-download-box .close::after{position: absolute;left: 50%;top: 50%;content: '';width: 14px;height: 2px;border-radius: 1px;background-color: #adadad;transform: translate(-50%,-50%) rotate(45deg);}
2042 | #wt-download-box .close::after,#wt-download-box .close::after{transform: translate(-50%,-50%) rotate(-45deg);}
2043 | #wt-download-box::before{display: none; content:'';position: absolute;width: 150px;height: 150px;border-radius: 100px;background-color: #00bcd4;z-index: -1;opacity: 0.7;top: 0;left: 0;transform: translate(-38%,-40%);}
2044 | #wt-download-box::after{display: none; content:'';position: absolute;width: 150px;height: 150px;border-radius: 100px;background-color: #FFC107;z-index: -1;opacity: 0.7;bottom: 0;right: 0;transform: translate(62%,30%);}
2045 | #wt-download-box ul li{ height: 38px;line-height: 38px;font-size: 11px;text-align: center;color:#909090;font-weight: 500;background-color: white;box-shadow: rgb(166 166 166 / 20%) 0px 1px 5px 1px;margin: 18px 30px;border-radius: 40px;}
2046 | `)
2047 | if (_CONFIG_.isMobile) {
2048 | GM_addStyle(`
2049 | #wt-set-box {width:80%;}
2050 | `);
2051 | }
2052 | const roles = util.initAppDate(false);
2053 | $(container).append(`
2054 |
2055 |
2056 |

2057 |
2058 |
2059 |
2060 |
2061 |
2062 |
2063 |
2064 |
2065 |
2066 |
2067 |
2068 |
2069 |
2070 |
2071 |
2072 |
2073 |
2074 |
2075 |
2076 |
2077 |
2078 |
2079 |
2080 |
2081 |
我的电量
2082 |
2083 |
2084 |

2085 |
2086 |
2087 |
请登录
2088 |
xxxxxxxxxx
2089 |
2090 |
2091 |
2092 |
2093 |
2094 |
${roles}
2095 |
2096 |
2097 |
2098 |
2101 |
2102 |
2103 |
提示
2104 |
2105 |
2106 |
2107 |
2108 |
2109 |
@${superVip._CONFIG_.homeUrl}
2110 |
v ${superVip._CONFIG_.version}
2111 |
2112 |
2113 |
2114 |
通知
2115 |
2116 |
2117 |
2118 |
2119 |
2120 | 退出播放
2121 |
2122 |
2123 |
2124 |
2125 |
如卡顿最好开梯子进行播放,理论上会流畅些。
2126 |
2127 | `)
2128 | if (_CONFIG_.user && _CONFIG_.user.avatar) {
2129 | util.logined()
2130 | }
2131 | return new Promise((resolve, reject) => resolve(container));
2132 | }
2133 |
2134 | bindEvent(container) {
2135 | const vipBox = $(`#wt-${_CONFIG_.vipBoxId}`)
2136 | if (GM_getValue('haijiao_hid_controller', null)) {
2137 | vipBox.css("transform", "translate(125%, -50%)")
2138 | $('#wt-left-show').css("transform", "translate(0, -50%)")
2139 | }
2140 |
2141 | vipBox.find("#wt-my").on("click", () => {
2142 | if (_CONFIG_.user) {
2143 | $('#wt-mask-box').css('display', 'block')
2144 | $("#wt-set-box .user-box-container").css('display', 'block')
2145 | $("#wt-set-box").removeClass('hid-set-box')
2146 | $("#wt-set-box").addClass('show-set-box')
2147 | $('#wt-set-box .user-box-container .nickname').html(_CONFIG_.user.nickname)
2148 | util.initAppDate()
2149 | } else {
2150 | util.addLogin()
2151 | $('#wt-login-mask').css('display','block')
2152 | $("#wt-login-box").removeClass('hid-set-box')
2153 | $("#wt-login-box").addClass('show-set-box')
2154 | const jsxl_login_code = GM_getValue('jsxl_login_code','')
2155 | if(jsxl_login_code){
2156 | $("#wt-login-box .max-input")[0].value = jsxl_login_code;
2157 | }
2158 | }
2159 | })
2160 |
2161 | vipBox.find("#wt-my-set").on("click", async () => {
2162 | if (!_CONFIG_.user) {
2163 | $("#wt-my").click()
2164 | return
2165 | }
2166 | if (!_CONFIG_.videoUrl.url) {
2167 | $('#wt-loading-box').css('display', 'block')
2168 | for (let i = 0; i < 5; i++) {
2169 | await util.sleep(1000)
2170 | if (_CONFIG_.videoUrl.url) {
2171 | $('#wt-loading-box').css('display', 'none')
2172 | break
2173 | }
2174 | }
2175 | $('#wt-loading-box').css('display', 'none')
2176 | }
2177 |
2178 | if (_CONFIG_.videoUrl.url) {
2179 | $('#wt-video-container').css('display', 'block')
2180 | $("#wt-hid-box").click()
2181 | if (_CONFIG_.videoUrl.type != 0) {
2182 | if (!_CONFIG_.videoUrl.url.startsWith('blob:http')) {
2183 | util.showTips({
2184 | title: location.href + '此视频可能还未被解析,正在解析中请勿操作。。。如解析时长大于1分钟请考虑开梯子再试插件唯一网站' + _CONFIG_.homeUrl,
2185 | hidConfirm: true
2186 | })
2187 | await util.sleep(500)
2188 | }
2189 | _CONFIG_.videoUrl.url = await get_m3u8_url_haijiao()
2190 | if (!_CONFIG_.videoUrl.url.includes('http')) {
2191 | if (_CONFIG_.videoUrl.url.includes('通知:') || _CONFIG_.videoUrl.url
2192 | .includes('最新版本')) {
2193 | util.showTips({
2194 | title: _CONFIG_.videoUrl.url
2195 | })
2196 | } else {
2197 | util.showTips({
2198 | title: _CONFIG_.videoUrl.url + '' + location
2199 | .href + '抱歉,解析失败,如有问题请联系发电网站' + _CONFIG_.homeUrl +'中售后联系方式'
2200 | })
2201 | }
2202 | return;
2203 | }
2204 | $('#wt-tips-box .btn-box .submit').click()
2205 | }
2206 |
2207 | //_CONFIG_.hjedd
2208 | if(true){
2209 | if (_CONFIG_.isMobile && _CONFIG_.isMobile[0] == 'iPhone') {
2210 | $('.wt-video').empty()
2211 | $('.wt-video').append(`
2212 |
2215 | `)
2216 | } else {
2217 | if(superVip._CONFIG_.videoUrl.playerType){
2218 | $('.wt-video').empty()
2219 | $('.wt-video').append(`
2220 |
2223 | `)
2224 | }else{
2225 | const video = document.querySelector('.wt-video #wt-video')
2226 | _CONFIG_.hls_dp = new Hls()
2227 | _CONFIG_.hls_dp.loadSource(_CONFIG_.videoUrl.url)
2228 | _CONFIG_.hls_dp.attachMedia(video)
2229 | _CONFIG_.hls_dp.on(Hls.Events.MANIFEST_PARSED, function() {
2230 | video.play()
2231 | })
2232 | }
2233 | }
2234 | }else{
2235 | $('#wt-video-container').css('display', 'none')
2236 | $("#wt-hid-box").click()
2237 | location.href = 'https://m3u8-player.com?aes=' + btoa(encodeURIComponent(_CONFIG_.videoUrl.url)) + '&k=' + btoa(_CONFIG_.videoUrl.keyUrl)
2238 | }
2239 | }
2240 | if (!_CONFIG_.videoUrl.url) {
2241 | if(_CONFIG_.videoUrl.type == 0){
2242 | util.showTips({
2243 | title: location.href +
2244 | '此帖子似乎是免费视频,请登录海角账号后使用海角自带的进行播放'
2245 | })
2246 | }else{
2247 | util.showTips({
2248 | title: location.href +
2249 | '抱歉未检测到帖子视频,请关掉其它插件再试,或苹果用Focus浏览器,安卓用Via浏览器再试'
2250 | })
2251 | }
2252 | }
2253 | })
2254 |
2255 | $('#wt-video-container div').on('click', function(e) {
2256 | e.stopPropagation()
2257 | })
2258 |
2259 | $('.wt-close-btn').on('click', function() {
2260 | $('#wt-video-container').css('display', 'none')
2261 | //_CONFIG_.hjedd
2262 | if(true){
2263 | var videos = document.querySelectorAll('video');
2264 | videos.forEach(function(video) {
2265 | // video.volume = 0.0
2266 | video.pause();
2267 | });
2268 | if (_CONFIG_.hls_dp) _CONFIG_.hls_dp.destroy()
2269 | }else{
2270 | $('.wt-video').empty()
2271 | }
2272 | $("#wt-left-show").click();
2273 | })
2274 |
2275 | vipBox.find("#wt-my-down").on("click", () => {
2276 | if (!_CONFIG_.user) {
2277 | $("#wt-my").click()
2278 | return
2279 | }
2280 | if(_CONFIG_.videoUrl.downloadUrlSign){
2281 | util.showDownLoadWindow();
2282 | return;
2283 | }
2284 | if (_CONFIG_.videoUrl.url) {
2285 | if(_CONFIG_.user && _CONFIG_.user.stopDownload || (_CONFIG_.user.role.use_download_num == _CONFIG_.user.role.max_download_num) ){
2286 | util.showTips({
2287 | title: '抱歉,今日下载次数' + _CONFIG_.user.role.max_download_num + '次已经用完,请明日再下载'
2288 | })
2289 | return;
2290 | }
2291 | if (_CONFIG_.videoUrl.type == 0 || (_CONFIG_.videoUrl.url.endsWith('.m3u8') && !
2292 | _CONFIG_.videoUrl.url.includes('preview')) || _CONFIG_.videoUrl
2293 | .downloadUrl) {
2294 | util.showTips({
2295 | title: '为了插件的稳定现已日限下载(当前账号日限' + _CONFIG_.user.role.max_download_num +'次,已使用' + _CONFIG_.user.role.use_download_num +'次,' + superVip._CONFIG_.user.downloadTips +',每个插件每日各' + _CONFIG_.user.role.max_download_num +'次),您确定要消耗一次次数来获取视频链接吗(如失败不计数)?',
2296 | doubt: true,
2297 | success: async (confirm) => {
2298 | if (confirm) {
2299 | try {
2300 | $('#wt-loading-box').css('display', 'block')
2301 | await util.sleep(300);
2302 | const res = await util.asyncHttp(
2303 | _CONFIG_.apiBaseUrl + '/d' + (Math.floor(Math.random() * 3) + 1) + '00/signDownload?downloadUrl=' +
2304 | (_CONFIG_.videoUrl.downloadUrl ?
2305 | _CONFIG_.videoUrl.downloadUrl :
2306 | _CONFIG_.videoUrl.url) +
2307 | '&isDownload=' + (_CONFIG_.videoUrl
2308 | .downloadUrl ? 1 : 0) +
2309 | '&videoType=' + _CONFIG_.videoUrl.type +
2310 | '&hjedd=' + (_CONFIG_.hjedd ? 1 : 0) +
2311 | '&origin=' + location.origin + '&app=海角社区')
2312 | $('#wt-loading-box').css('display', 'none')
2313 | if (res.errMsg == 'success') {
2314 | const result = JSON.parse(res.responseText)
2315 | if (result.errCode != 0) {
2316 | throw new Error(result.errMsg)
2317 | }
2318 | if(result.newToken) _CONFIG_.user.token = result.newToken;
2319 | _CONFIG_.user.role.use_download_num = result.useDownloadNum
2320 | _CONFIG_.videoUrl.downloadUrlSign = result.data
2321 | util.showDownLoadWindow(true, result.errMsg);
2322 | GM_setValue('jsxl_user', _CONFIG_.user);
2323 | } else {
2324 | $('#wt-loading-box').css('display', 'none')
2325 | util.showTips({
2326 | title: _CONFIG_.videoUrl.url +
2327 | '' + location.href +
2328 | '' + res.errMsg
2329 | })
2330 | }
2331 | } catch (e) {
2332 | console.log(e)
2333 | $('#wt-loading-box').css('display', 'none')
2334 | util.showTips({
2335 | title: e.message +
2336 | '' + location.href +
2337 | '获取下载链接失败'
2338 | })
2339 | if(e.message.includes('明日再下载')){
2340 | _CONFIG_.user.stopDownload = true
2341 | _CONFIG_.user.role.use_download_num = _CONFIG_.user.role.max_download_num
2342 | GM_setValue('jsxl_user', _CONFIG_.user);
2343 | }
2344 | }
2345 | }
2346 | }
2347 | })
2348 | return;
2349 | }
2350 | }
2351 |
2352 | if (_CONFIG_.videoUrl.url && _CONFIG_.videoUrl.type == 0) {
2353 | _CONFIG_.videoUrl.url = location.origin + _CONFIG_.videoUrl.url + (_CONFIG_
2354 | .videoUrl.url.includes('?') ? '&' : '?') + 'type=.m3u8';
2355 | }
2356 | if ((_CONFIG_.videoUrl.url && _CONFIG_.videoUrl.url.startsWith('http')) && !_CONFIG_.videoUrl.url.includes('preview') && _CONFIG_.videoUrl.url.includes('.m3u') || _CONFIG_
2357 | .videoUrl.downloadUrl) {
2358 | util.showDownLoadWindow();
2359 | } else {
2360 | util.showTips({
2361 | title: _CONFIG_.videoUrl.url + '' + location.href +
2362 | '需要播放按钮有小绿点或暂不支持下载,请等待修复'
2363 | })
2364 | }
2365 | })
2366 |
2367 | vipBox.find("#wt-hid-box").on("click", () => {
2368 | vipBox.css("transform", "translate(125%, -50%)");
2369 | $('#wt-left-show').css("transform", "translate(0, -50%)")
2370 | GM_setValue('haijiao_hid_controller', 1)
2371 | })
2372 |
2373 | $('#wt-left-show').on('click', () => {
2374 | $('#wt-left-show').css("transform", "translate(-60px, -50%)");
2375 | vipBox.css("transform", "translate(0, -50%)")
2376 | GM_setValue('haijiao_hid_controller', '')
2377 | })
2378 |
2379 | $('#wt-mask-box').on('click', () => {
2380 | $('#wt-mask-box').css('display', 'none')
2381 | $("#wt-set-box").removeClass('show-set-box');
2382 | $("#wt-set-box").addClass('hid-set-box')
2383 | $("#wt-download-box").removeClass('show-set-box');
2384 | $("#wt-download-box").addClass('hid-set-box')
2385 | setTimeout(() => {
2386 | $("#wt-set-box .line-box").css('display', 'none');
2387 | $("#wt-set-box .user-box-container").css('display', 'none')
2388 | }, 500)
2389 | })
2390 |
2391 | $("#wt-set-box .close").on("click", () => {
2392 | $('#wt-mask-box').click()
2393 | })
2394 |
2395 | vipBox.find("#wt-my-notify").on("click", () => {
2396 | if (_CONFIG_.showNotify) {
2397 | $('#wt-notify-box').click()
2398 | } else {
2399 | const notify = GM_getValue('notify', '');
2400 | if (notify && (notify.date == new Date().setHours(0, 0, 0, 0))) {
2401 | util.showNotify({
2402 | title: notify.msgInfo
2403 | })
2404 | } else {
2405 | util.showNotify({
2406 | title: '还没有通知信息'
2407 | })
2408 | };
2409 | util.showAndHidTips('wt_my_notify', 'set', false)
2410 | }
2411 | })
2412 |
2413 | $("#wt-set-box .user-box .user-info").on('click', function() {
2414 | util.showTips({
2415 | title: '确定要跳转到插件官网吗?',
2416 | doubt: true,
2417 | success: (res) =>{
2418 | if(res){
2419 | location.href = superVip._CONFIG_.homeUrl
2420 | }
2421 | }
2422 | })
2423 | })
2424 |
2425 | $('#wt-set-box .logout').on('click', function(e) {
2426 | util.showTips({
2427 | title: '您确定要退出登录吗?',
2428 | doubt: true,
2429 | success: (res) => {
2430 | if (res) {
2431 | util.logouted()
2432 | $('#wt-mask-box').click()
2433 | }
2434 | }
2435 | })
2436 | e.stopPropagation()
2437 | })
2438 |
2439 | if (!_CONFIG_.user) {
2440 | util.addLogin()
2441 | util.findTargetElement('#wt-my').then(res => {
2442 | setTimeout(() => {
2443 | res.click()
2444 | }, 2500)
2445 | })
2446 | }
2447 | }
2448 | }
2449 |
2450 | return {
2451 | start: () => {
2452 | _CONFIG_.user = GM_getValue('jsxl_user', '')
2453 | if (_CONFIG_.user) {
2454 | if (_CONFIG_.user.login_date && (_CONFIG_.user.login_date != new Date().setHours(0, 0, 0,
2455 | 0))) {
2456 | _CONFIG_.user = ''
2457 | GM_setValue('jsxl_user', '')
2458 | }
2459 | }
2460 | new BaseConsumer().parse()
2461 | },
2462 | _CONFIG_
2463 | }
2464 | })();
2465 |
2466 | (async function() {
2467 | if(unsafeWindow.wt_haijiao_script || location.href.includes('haij2mb') || location.href.includes('haij.cc') || location.href.includes('haijiao.one')){
2468 | return;
2469 | }
2470 | unsafeWindow.wt_haijiao_script = true;
2471 |
2472 | if (location.href.includes('tools.bugscaner.com')) {
2473 | util.findTargetElement('.input-group input').then(res => {
2474 | const url = location.search.replace('?m3u8=', '').replace(/\s*/g, "")
2475 | if (url && url.startsWith('http')) {
2476 | $(res).val(url)
2477 | }
2478 | })
2479 | return
2480 | }
2481 | if (location.href.includes('tools.thatwind.com')) {
2482 | GM_addStyle(`.top-ad{display: none !important;}`)
2483 | util.findTargetElement('.bx--text-input__field-outer-wrapper input', 10).then(res => {
2484 | $(res).val(Date.now())
2485 | res.dispatchEvent(new Event("input"))
2486 | })
2487 | return
2488 | }
2489 | if (location.href.includes('blog.luckly-mjw.cn')) {
2490 | GM_addStyle(`
2491 | #m-app a,.m-p-temp-url,.m-p-cross,.m-p-input-container div:nth-of-type(1){display: none !important;}
2492 | .m-p-input-container{ display: block;}
2493 | .m-p-input-container input{ width: 100%;font-size: 12px;margin-bottom: 5px;}
2494 | .m-p-input-container div{ height: 45px;line-height: 45px;font-size: 15px;margin-top: 3px;}
2495 | .m-p-stream{line-height: normal;font-size: 12px;}
2496 | `)
2497 | return
2498 | }
2499 | if(location.href.includes('m3u8-player.com')){
2500 | GM_addStyle(`#ckplays, .am-input-group-btn, .am-form-field{display: none !important;}`)
2501 | let url = decodeURIComponent(atob(new URLSearchParams(location.search).get('aes')))
2502 | const keyUrl = atob(new URLSearchParams(location.search).get('k'))
2503 | if(url && url.includes('jsxl')){
2504 | url = url.replace('video.jsxl', 'video1.jsxl')
2505 | $.ajax({
2506 | url: url,
2507 | type: 'GET',
2508 | async: false,
2509 | success: function(response) {
2510 | if(response && response.startsWith('#EXTM3')){
2511 | const keyUrls = /enc.+\.key/.exec(response)
2512 | response = response.replace(keyUrls[0], keyUrl + keyUrls[0])
2513 | const file = new Blob([response], {
2514 | type: 'text/plain'
2515 | })
2516 | url = URL.createObjectURL(file);
2517 | }
2518 | }
2519 | });
2520 | if(!url.startsWith('blob')){
2521 | for(let i = 0;i< 5; i++){
2522 | $.ajax({
2523 | url: url,
2524 | type: 'GET',
2525 | async: false,
2526 | success: function(response) {
2527 | if(response && response.startsWith('#EXTM3')){
2528 | const keyUrls = /enc.+\.key/.exec(response)
2529 | response = response.replace(keyUrls[0], keyUrl + keyUrls[0])
2530 | const file = new Blob([response], {
2531 | type: 'text/plain'
2532 | })
2533 | url = URL.createObjectURL(file);
2534 | }
2535 | }
2536 | });
2537 | if(url.startsWith('blob')){
2538 | break;
2539 | }
2540 | }
2541 | }
2542 | }
2543 | if(!url.startsWith('blob') && !url.startsWith('http') && !url.includes('/api/address/')){
2544 | alert('抱歉,播放失败,请刷新页面再试。')
2545 | return
2546 | }
2547 | let hlsDp = ''
2548 | util.findTargetElement('.cont p').then(res =>{
2549 | $(res).html('如卡顿或加载失败最好开梯子进行播放,理论上会流畅些(梯子也分三六九等,一般贵的理论上网速更好),卡顿也可下载后再播放')
2550 | $(res).css({
2551 | "padding": "22px",
2552 | "color": "#00bcd4",
2553 | "letter-spacing": "1px"
2554 | })
2555 | })
2556 | util.findTargetElement('.am-margin-bottom-lg').then(res =>{
2557 | $(res).append(`
2558 |
2559 | `)
2560 | $('.player2').on("click", function(){
2561 | var videos = document.querySelectorAll('video');
2562 | videos.forEach(function(video) {
2563 | video.pause();
2564 | });
2565 | if($('.m3u8-mask-container').length != 0){
2566 | $('.m3u8-mask-container').css("display","block")
2567 | }else{
2568 | $("body").append(`
2569 |
2570 |
2571 |
2572 | 退出播放
2573 |
2574 |
2575 |
2576 |
2577 |
2578 | `)
2579 | $(".m3u8-mask-container .wt-close-btn").on("click", function(){
2580 | $('.m3u8-mask-container').css("display","none")
2581 | var videos = document.querySelectorAll('video');
2582 | videos.forEach(function(video) {
2583 | video.pause();
2584 | });
2585 | if (hlsDp) hlsDp.destroy()
2586 | })
2587 | }
2588 | if (superVip._CONFIG_.isMobile && superVip._CONFIG_.isMobile[0] == 'iPhone') {
2589 | $('.m3u8-mask-container .wt-video').empty()
2590 | $('.m3u8-mask-container .wt-video').append(`
2591 |
2594 | `)
2595 | } else {
2596 | const video = document.querySelector('.m3u8-mask-container .wt-video #wt-video')
2597 | hlsDp = new Hls()
2598 | hlsDp.loadSource(url)
2599 | hlsDp.attachMedia(video)
2600 | hlsDp.on(Hls.Events.MANIFEST_PARSED, function() {
2601 | video.play()
2602 | })
2603 | }
2604 | })
2605 | $('.player2').click()
2606 | })
2607 | return
2608 | }
2609 |
2610 | const oldadd = EventTarget.prototype.addEventListener
2611 | EventTarget.prototype.addEventListener = async function(...args) {
2612 | if (args[0] == 'click') {
2613 | if (this.className == 'login-btn' || this.className ==
2614 | 'el-button login-form-button el-button--primary') {
2615 | const user = GM_getValue('haijiao_userpwd', '')
2616 | if (user) {
2617 | const e = new Event("input")
2618 | util.findTargetElement('input[placeholder="请输入用户名/邮箱"],input[placeholder="请输入用户名"]')
2619 | .then(res => {
2620 | $(res).val(user.username)
2621 | res.dispatchEvent(e)
2622 | util.findTargetElement('input[type="password"]').then(res => {
2623 | $(res).val(user.pwd)
2624 | res.dispatchEvent(e)
2625 | })
2626 | })
2627 | }
2628 | }
2629 | }
2630 | oldadd.call(this, ...args)
2631 | }
2632 | superVip.start();
2633 | })();
--------------------------------------------------------------------------------