1$(function() 2{ 3 //window._fb = window._fb || new window.Facebook('1572169586426978'); 4 5 //active view size 6 new (function() 7 { 8 var view=$('#mainView'); 9 var fullView=$('#FullView'); 10 var viewResize=function() 11 { 12 var wh=$(window).height(); 13 var min=wh-275; 14 if(typeof fullView[0]!='undefined') 15 { 16 min-=$(fullView[0]).height(); 17 } 18 if(min<0) 19 { 20 min=0; 21 } 22 view.css('min-height',min+'px'); 23 }; 24 $(window).resize(viewResize); 25 viewResize(); 26 27 //window._fb.setScope('email,public_profile,user_friends'); 28 29 $("#MenuLogin").click(function(){ 30 var windowWidth = $(window).width(); 31 var windowHeight = $(window).height(); 32 var MaskDiv = document.createElement('div'); 33 var MainDiv = document.createElement('div'); 34 var MaskLoginContent = document.createElement('div'); 35 var LoginTitle = $('<div></div>'); 36 var AccountInput = $('<input type="text" id="account" name="account" class="json">'); 37 var PasswordInput = $('<input type="password" id="passwd" name="passwd" clsaa="json">'); 38 var forgetPwd = $('<a>å¿è¨å¯ç¢¼</a>'); 39 var WebLogin = $('<button>ç»å ¥</button>') 40 var FBLogin = $('<button>FBç»å ¥</button>') 41 42 /* 43 var grecaptchaScript = $('<script></script>').attr('src','https://www.google.com/recaptcha/api.js?hl=zh-TW'); 44 var addGoogleRecaptcha = false; 45 46 $('script').each(function(){ 47 if( $(this).attr('src') == 'https://www.google.com/recaptcha/api.js?hl=zh-TW' ) 48 { 49 addGoogleRecaptcha = true; 50 } 51 }); 52 53 if( addGoogleRecaptcha ) 54 { 55 $('body').append(grecaptchaScript); 56 } 57 */ 58 59 $(MaskDiv).width(windowWidth).height(windowHeight).css({ 60 'background':'rgba(33,33,33,0.8)', 61 'position':'fixed', 62 'top':'0', 63 'left':'0', 64 'z-index':'999' 65 }).appendTo('body'); 66 67 $('<div></div>').html('ç»å ¥ LOGIN').css({ 68 'color':'#6fc769', 69 'width':'200px', 70 'height':'50px', 71 'line-height':'50px', 72 'text-align':'center', 73 'font-size':'25px', 74 'margin':'0 0 0 50px', 75 'float':'left' 76 }).appendTo(LoginTitle); 77 LoginTitle.css({ 78 'width':'100%', 79 'height':'50px', 80 'border-bottom':'solid 3px #6fc769' 81 }).appendTo(MainDiv); 82 83 //remove 84 $('<div></div>').html('X').css({ 85 'color':'#aaa', 86 'text-align':'right', 87 'float':'left', 88 'font-size':'12px', 89 'width':'45px', 90 'margin':'0 5px 0 0', 91 'ling-height':'12px', 92 'cursor': 'pointer' 93 }).unbind('click').click(function(){ 94 $(MaskDiv).remove(); 95 $(MainDiv).remove(); 96 //$(grecaptchaScript).remove(); 97 }).appendTo(LoginTitle); 98 99 //forgetPwd 100 forgetPwd.attr('href','javascript:;').addClass('maskLoginLink').unbind('click').click(function(){ 101 var forgetEmail = $('<input type="text" id="forget_Email" name="forget_Email" class="json">'); 102 var sendBox = $('<button>éåº</button>') 103 104 LoginTitle.children('div:eq(0)').html('å¿è¨å¯ç¢¼ Forgot Password').css({ 105 'margin':'0', 106 'width':'285px', 107 'font-size':'22px', 108 'text-align':'right' 109 }); 110 LoginTitle.children('div:eq(1)').css({'width':'10px'}) 111 $(MaskLoginContent).css({'marign':'20px 0 0 0 '}).html(''); 112 $(MaskLoginContent).append('<div id="error_str"></div>'); 113 $('<div></div>').html('è«è¼¸å ¥æ¨çE-Mailä¿¡ç®±<br/>æåææç»å ¥æ¹å¼è¨å°æ¨çä¿¡ç®±').css({ 114 'color':'#000000', 115 'height':'60px', 116 'line-height':'24px' 117 }).appendTo(MaskLoginContent); 118 119 $('<div></div>').append(forgetEmail).appendTo(MaskLoginContent); 120 121 sendBox.css({ 122 'border-radius': '5px', 123 'background-color': '#f77c38', 124 'width':'100%', 125 'height':'30px', 126 'border': '0px', 127 'color':'#ffffff', 128 'cursor': 'pointer', 129 'margin':'10px 0 0 0' 130 }).unbind('click').click(function(){ 131 $.ajax({ 132 url:'/Member/forgetsend', 133 data:{forget_Email:forgetEmail.val()}, 134 type:'POST', 135 success:function(data){ 136 if( data.status ) 137 { 138 location.reload(); 139 } 140 else 141 { 142 $("#error_str").css({'color':'#ff0000','text-align':'center'}).html(data.error); 143 } 144 } 145 }); 146 }).appendTo(MaskLoginContent); 147 }); 148 149 //weblogin 150 WebLogin.css({ 151 'border-radius': '5px', 152 'background-color': '#f77c38', 153 'width':'100%', 154 'height':'30px', 155 'border': '0px', 156 'color':'#ffffff', 157 'cursor': 'pointer' 158 }).unbind('click').click(function(){ 159 $.ajax({ 160 url:'/Member/logintreat', 161 data:{account:AccountInput.val(),passwd:PasswordInput.val()}, 162 type:'POST', 163 success:function(data){ 164 if( data.status ) 165 { 166 location.reload(); 167 } 168 else 169 { 170 $("#error_str").css({'color':'#ff0000','text-align':'center'}).html(data.error); 171 } 172 } 173 }) 174 }); 175 176 //fblogin 177 (function() 178 { 179 let onLogin = function() 180 { 181 FB.api('/me?fields=id,name,email', function(response) 182 { 183 $.ajax({ 184 url:'/Member/loginFB', 185 data:response, 186 type:'POST', 187 success:function(data){ 188 if( data.status ) 189 { 190 location.reload(); 191 } 192 else 193 { 194 alert(data.error); 195 } 196 } 197 }); 198 }); 199 }; 200 let script = document.createElement('script'); 201 script.async = true; 202 script.src = '//connect.facebook.net/zh_TW/sdk.js'; 203 script.addEventListener('load', function() 204 { 205 FB.init({ 206 appId : '1260260897821362', 207 cookie : true, 208 xfbml : true, 209 version : 'v12.0' 210 }); 211 FBLogin.css({ 212 'border-radius': '5px', 213 'background-color': '#5576be', 214 'width':'100%', 215 'height':'30px', 216 'border': '0px', 217 'color':'#ffffff', 218 'cursor': 'pointer' 219 }).unbind('click').click(function() 220 { 221 FB.getLoginStatus(function(response) 222 { 223 if(response.status == 'connected') 224 { 225 return onLogin(); 226 } 227 FB.login(function(response) 228 { 229 if(response.status == 'connected') 230 { 231 return onLogin(); 232 } 233 }, {scope: 'public_profile,email'}); 234 }); 235 }); 236 }); 237 document.getElementsByTagName('head')[0].appendChild(script); 238 })(); 239 /* 240 window._fb.ready(function(){ 241 FBLogin.css({ 242 'border-radius': '5px', 243 'background-color': '#5576be', 244 'width':'100%', 245 'height':'30px', 246 'border': '0px', 247 'color':'#ffffff', 248 'cursor': 'pointer' 249 }).unbind('click').click(function(){ 250 window._fb.authorize(function(res){ 251 if( res == true ) 252 { 253 this.getUserData(function(obj){ 254 if( obj.email == '' ) 255 { 256 alert( '系統é¯èª¤,è«ç¨åå¨è©¦!' ); 257 return false;
258 } 259 $.ajax({ 260 url:'/Member/loginFB', 261 data:{id:obj.id,email:obj.email,name:obj.name,gender:obj.gender,picture:obj.picture.data}, 262 type:'POST', 263 success:function(data){ 264 if( data.status ) 265 { 266 location.reload(); 267 } 268 else 269 { 270 alert(data.error); 271 } 272 } 273 }); 274 275 }); 276 } 277 else 278 { 279 alert('Facebook系統é¯èª¤!'); 280 } 281 }); 282 }); 283 }); 284 */ 285 $(MaskLoginContent).attr('id','maskLoginContent').append('<div id="error_str"></div>'); 286 $(MaskLoginContent).append('<div>帳è</div>'); 287 $('<div></div>').append(AccountInput).appendTo(MaskLoginContent); 288 $(MaskLoginContent).append('<div>å¯ç¢¼</div>'); 289 $('<div></div>').append(PasswordInput).appendTo(MaskLoginContent); 290 //$(MaskLoginContent).attr('id','maskLoginContent').append('<div id="Grecaptcha"><div class="g-recaptcha" data-sitekey="6LfHsRQTAAAAAGso2uFBbZp5aqCFU54nMe5W1eR4" style="transform:scale(0.77);-webkit-transform:scale(0.73);transform-origin:0 0;-webkit-transform-origin:0 0;"></div></div>'); 291 $('<div></div>').append('<a class="maskLoginLink" href="/member/register">Mail註å</a> | ').append(forgetPwd).css({'text-align':'center'}).appendTo(MaskLoginContent); 292 $('<div></div>').append(WebLogin).appendTo(MaskLoginContent); 293 $('<div></div>').css({'margin':'10px 0 0 0'}).append(FBLogin).appendTo(MaskLoginContent); 294 295 $(MaskLoginContent).appendTo(MainDiv) 296 297 298 $(MainDiv).width('300').height('330').css({ 299 'background':'rgb(255,255,255)', 300 'position':'absolute', 301 'top':'50px', 302 'left':((windowWidth/2)-150)+'px', 303 'z-index':'9999' 304 }).appendTo('body'); 305 306 $(window).resize(function(){ 307 $(MaskDiv).width($(window).width()).height($(window).height()); 308 }); 309 310 }); 311 312 if( window.type == "login") 313 { 314 $("#MenuLogin").trigger('click'); 315 } 316 317 //heard search 318 $('#searchStart').click(function() 319 { 320 var keyworb = $('#headerSearchWrap').find('#searchText').val(); 321 if( keyworb != '' ) 322 { 323 window.location = "/Search?k=" + keyworb; 324 } 325 }); 326 327 })(); 328 329 //google analytics
vendor: 349 bytes, lines 329-335
329 330 (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ 331 (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), 332 m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) 333 })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); 334 335 ga('create', '
335UA-75817431-2
vendor: 47 bytes, lines 335-338
335', 'auto'); 336 ga('send', 'pageview'); 337 338
vendor: 3 bytes, line 339
339});
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.