PageSourceSearch

https://www.exoborne.com/js/common.js

js exoborne.com collected 2026-09-30 14:33:57 UTC 8,408 bytes, 207 lines download raw bytes

1
2var isMobile = /(iPhone|iPad|iPod|iOS|Android|Windows Phone|BlackBerry|SymbianOS)/i.test(navigator.userAgent);
3var orientationDerection = true;
4function getDerection(){
5  // var cwidth = Math.min(window.innerWidth,Math.min(document.documentElement.clientWidth,document.body.clientWidth));
6  // var cheight = Math.min(window.innerHeight,Math.min(document.documentElement.clientHeight,document.body.clientHeight));
7  // if(isMobile){
8    $('.top_nav_list').removeClass('show');
9  // }
10  
11  // if (cwidth < cheight) { 
12  //   orientationDerection = true;
13  //   if(isMobile){
14  //     // console.log(111)
15  //     $('.top_nav_list').css('display','block');
16  //     $('.top_nav_list').hide();
17  //   }
18  // } 
19  // if (cwidth > cheight){ 
20  //   orientationDerection = false;
21  //   if(isMobile){
22  //     // console.log(222)
23  //     $('.top_nav_list').css('display','flex');
24  //   }
25  // } 
26}
27setTimeout(function(){
28  getDerection();
29},300)
30window.addEventListener("onorientationchange" in window ? "orientationchange" : "resize", function() {
31  setTimeout(function(){
32    getDerection();
33  },300)
34}, false);
35
36function showPop(id) {
37  $('#'+id).show();
38}
39function hidePop() {
40  $('.dia').hide();
41}
42
43
44function showTips(mes){
45  var tips = document.createElement('div');
46  $(tips).addClass('tips');
47  $(tips).html('<p>'+mes+'</p>');
48  $('body').append(tips)
49    $(tips).animate({
50      'top': '50%',
51      'opacity':1
52    },500,function(){
53      setTimeout(function(){
54        $(tips).animate({
55          'top': '45%',
56          'opacity':0
57        },500,function(){
58          $(this).remove();
59        })
60      },1000)
61    })
62}
63
64//移动端导航条处理
65$('.top_nav_ibtn').on('click', function (ev) {
66  $('.top_nav_list').toggleClass('show');
67  ev.stopPropagation();
68});
69$('.top_nav_list').on('click','li,a',function(ev){
70  if (isMobile && getLandscape()) {
71    $('.top_nav_list').removeClass('show');
72  }
73  ev.stopPropagation();
74})
75$('html,body').on('click', function () {
76  if (isMobile && getLandscape()) {
77    $('.top_nav_list').removeClass('show');
78  }
79});
80
81function getLandscape(){
82  var wwd = document.documentElement.clientWidth;
83  var whd = Math.min(window.innerHeight,Math.min(document.documentElement.clientHeight,document.body.clientHeight));
84  if(wwd >= whd){
85    return false;
86  }else{
87    return true;
88  }
89}
90
91
92
93// 横屏提示
94function landscape(isVertical, config) { 
95  var showWay = isVertical ? "@media screen and (orientation : landscape){#orientLayer{display:block;} }" :
96      "@media all and (orientation : portrait){#orientLayer{display: block;} }";
97  var color = config && config.color ? config.color : "#000",
98      images = config && config.images ? config.images :
99      "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIYAAADaCAMAAABU68ovAAAAXVBMVEUAAAD29vb////x8fH////////x8fH5+fn29vby8vL////5+fn39/f6+vr////x8fH////////+/v7////09PT////x8fH39/f////////////////////x8fH///+WLTLGAAAAHXRSTlMAIpML+gb4ZhHWn1c2gvHBvq1uKJcC6k8b187lQ9yhhboAAAQYSURBVHja7d3blpowFIDhTUIAOchZDkre/zE7ycySrbUUpsRN2/1fzO18KzEqxEVgTiZNfgmmtxRc8iaR8HNe8x4BtjQePKayYCIoyBSgvNNE1AkNSHqZyLqk97EgUCCHBzZ5mkg7ScvIJuIyOyXBRFxgpqWZyGsAZLB1KjsJi8nutHU4JCRbFRH8tmirI9k8Jx2sqNs8K/m0LQkrktO2crgcgXGB4AiTEsB0hJfo9MGgX7CGcYiYwQxmMOOvZwRhBG8tCoMXjBDeXvWCEcHbi14wgCBmMIMZzGAGM5jxETNwzMAxA8cMHDNwzMAxA8cMHDNwzMAxA8cMHDNwzMAxY6E2rUQxnH2tz9cirlJFwFBJedaPnUv0M7++egPDE8iAJcIDmxwH5wwv9vUviw2kLbVO3TJU5uul/EyB0FoLp4x60PdGUd3qPurrWyjGGTc05u+1dcgI7/+tCCPARWGhH7o5Y7RCf+bH9ctXLp6v2BVDxfqz0oPXeSVaNtINo/1SXDv4dck8IIkbhtC2ol+iouEonTBCbYvVMnXOjxww6s/RFrBUpXHh/gw1rHj5d/qhYn9Gpk2FWh6xRBRX5Oj3Znh2Sq49/L6+y8pB26q9GbE2dbA2mVbx6I+7MfBglLCttm73ZQi7AD3iL4HqjFYJHSPRppqaUaJ3ATpGa+ckpGak2hRRMyqjGMkvl+xyFeSMwjAqcsZgGDdyhl0oNTnDN4yenJGZFGxNChP5/Y3efh6SM2rDOJMzboYxkDMqwyjIGcIw6F+io2FU1IxIm1JqRmgXSkvNKNCXeTpGrU0JNSO2c6LIGPgCS8AuDHz9ta0SXWDtxoDRH+MqlbC2Dt2G2JFRadtQZt2qq/orGowdGb2euxYiqWEpVWhTBnszoNAPdStuQwxqf0aocdWKW4Z+DfszIh8pxJqbuCE4YAC+4bm0evtipjpgJHeFnyyt1Ku2xa0bhjxr27p75rECNwyI9ZwvXkHq+7aTaMEV44YYy/spfgjgjNHaWW+GeUhGEX7tLlVinIFDDSgnOwhi1V6bU0b6tVS9eAERe863g4dRrtiHdc6o+nn5vtyVVgR79Cqt4uL6gfHPQyGqtP2vf7HADGbcYwaOGThm4JiBYwaOGThm4JiBYwaOGThm4JiBYwaOGThm4JiBYwaOGThm4JjhtOM+J/AgT008yDMkN/dPP9hzS8zAMQN3OEYeekp5YU7KOKXwVXqiY+QS7smcinGKABWdiBgpPJTSMHJ4KidhhPBUSMLw4CmPhKHgKUXCkHsygum71ftNSgCX6bsl8FQyfbcL5EdYsDk0R3j7aiA5wpt5AjKg/2gLJEBD/0Hf2OOf/vRrj6z/7GtP4B3nMKyjHA12kIPSjnJs3FEO0TvKkYJHOWCR+rjJH0Vn6fI5PjNbAAAAAElFTkSuQmCC";
100  // style
101  var nodeStyle = document.createElement('style');
102  nodeStyle.setAttribute('type', 'text/css');
103  nodeStyle.innerHTML =
104      '@-webkit-keyframes rotation{10%{transform: rotate(90deg); -webkit-transform: rotate(90deg)} 50%, 60%{transform: rotate(0deg); -webkit-transform: rotate(0deg)} 90%{transform: rotate(90deg); -webkit-transform: rotate(90deg)} 100%{transform: rotate(90deg); -webkit-transform: rotate(90deg)} } @keyframes rotation{10%{transform: rotate(90deg); -webkit-transform: rotate(90deg)} 50%, 60%{transform: rotate(0deg); -webkit-transform: rotate(0deg)} 90%{transform: rotate(90deg); -webkit-transform: rotate(90deg)} 100%{transform: rotate(90deg); -webkit-transform: rotate(90deg)} } #orientLayer{display: none; z-index: 999999;} ' +
105      showWay +
106      ' .mod-orient-layer{display: none; position: fixed; height: 100%; width: 100%; left: 0; top: 0; right: 0; bottom: 0; background: ' +
107      color +
108      '; z-index: 9997} .mod-orient-layer__content{position: absolute; width: 100%; top: 50%; margin-top: -75px; text-align: center} .mod-orient-layer__icon-orient{background-image: url(' +
109      images +
110      '); display: inline-block; width: 67px; height: 109px; transform: rotate(90deg); -webkit-transform: rotate(90deg); -webkit-animation: rotation infinite 1.5s ease-in-out; animation: rotation infinite 1.5s ease-in-out; -webkit-background-size: 67px; background-size: 67px} .mod-orient-layer__desc{margin-top: 20px; font-size: 15px; color: #fff}'
111  document.getElementsByTagName('body')[0].appendChild(nodeStyle);
112  // dom
113  var nodeDom = document.createElement('div');
114  nodeDom.setAttribute('id', 'orientLayer');
115  nodeDom.setAttribute('class', 'mod-orient-layer');
116  nodeDom.innerHTML =
117      '<div class="mod-orient-layer__content"> <i class="icon mod-orient-layer__icon-orient"></i> </div>';
118  document.getElementsByTagName('body')[0].appendChild(nodeDom);
119};
120if(isMobile){
121  //  landscape(1);
122   $('.w_cont1').append($('.w_register'));
123}
124
125window.addEventListener('orientationchange', function() {
126  if(isMobile){
127    $('input').blur();
128    setTimeout(function(){
129      $('input').blur();
130    },500)
131  }
132});
133
134// //luwenjie hualun
135// window.addEventListener('mousewheel', function(event){
136//   if (event.ctrlKey === true || event.metaKey) {
137//         event.preventDefault();
138//   }
139// },{ passive: false});
140
141// //firefox
142// window.addEventListener('DOMMouseScroll', function(event){
143//     if (event.ctrlKey === true || event.metaKey) {
144//           event.preventDefault();
145//     }
146// },{ passive: false});
147// //+_
148// window.onload = function() {
149//   document.addEventListener('keydown', function (event) {
150//     if ((event.ctrlKey === true || event.metaKey === true)
151//         && (event.which === 61 || event.which === 107
152//         || event.which === 173 || event.which === 109
153//         || event.which === 187  || event.which === 189))
154//     {
155//         event.preventDefault();
156//     }
157//   }, false);
158// }
159
160$(window).on('scroll',function(){
161  setTopNav();
162})
163
164
165function setTopNav(){
166  if(!isMobile){
167    var stl = document.body.scrollLeft || document.documentElement.scrollLeft;
168    // var st = document.body.scrollTop || document.documentElement.scrollTop;
169    // console.log(stl)
170    $('.top_nav').css('transform','translateX(-'+ stl +'px)');
171    // $('.top_nav').css('top', st +'px');
172  }
173}
174setTopNav();
175
176
177
178$('#checklogin3').on('change',function(){
179  if(this.checked){
180    $('#checklogin4').get(0).checked = true;
181    // $('#checklogin5').get(0).checked = true;
182  }
183  getdiaChecked();
184})
185$('#checklogin4').on('change',function(){
186  getdiaChecked();
187})
188// $('#checklogin5').on('change',function(){
189//   getdiaChecked();
190// })
191
192function getdiaChecked(){
193  var chekck3 = $('#checklogin3').get(0).checked;
194  var chekck4 = $('#checklogin4').get(0).checked;
195  // var chekck5 = $('#checklogin5').get(0).checked;
196
197  if(chekck3  && chekck4){
198    $('.dia_sign_btn2').removeClass('grey');
199  }else{
200    $('.dia_sign_btn2').addClass('grey');
201  }
202}
203getdiaChecked();
204
205
206
207

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.