1'use strict'; 2var MutualSwitching = MutualSwitching || { 3 config: {}, 4 util: {}, 5 run: {} 6}; 7 8//============================================================================== 9// è¨å®ã«é¢ããã¢ã¸ã¥ã¼ã« 10//============================================================================== 11MutualSwitching.config = (function () { 12 /** 13 * è¨å®å¤ 14 * @type {Object} 15 */ 16 var config = {}; 17 18 /** 19 * PCç¨ãã¥ã¼ãã¼ãå¹ 20 * @type {Number} 21 */ 22 config.viewPortWidthPc = 0; 23 24 /** 25 * ã¹ããç¨ãã¥ã¼ãã¼ãå¹ 26 * @type {Number} 27 */ 28 config.viewPortWidthSp = 0; 29 30 /** 31 * ãã¼ã¸ã®ã¬ã¤ã¢ã¦ãã¿ã¤ã 32 * @type {Number} 33 * 0: ã¬ã¹ãã³ã·ã 34 * 1: PC/SPåå¥ãã¶ã¤ã³ 35 * 2: ãã¬ãã·ãã«ï¼ãªããã + ã¬ã¹ãã³ã·ãï¼ 36 */ 37 config.layoutType = 0; 38 39 /** 40 * ãã¹å¥è¨å® 41 * @type {Object} 42 */ 43 config.pathSettings = {}; 44 45 /** 46 * PCç¨CSSãã¡ã¤ã«å 47 * @type {String} 48 */ 49 config.pcCssName = 'theme/base/css/top.css'; 50 51 /** 52 * ã¹ããç¨CSSãã¡ã¤ã«å 53 * @type {String} 54 */ 55 config.spCssName = 'theme/base/css/sp_top.css'; 56 57 /** 58 * ã¹ããç¨å°ç¨ãã¼ã¸ã®æç¡ 59 * @type {Boolean} 60 */ 61 config.existsSpPage = false; 62 63 /** 64 * ãã¬ãã¥ã¼ãã¼ã¸ã§ã®åç §ã§ããã 65 * @type {Boolean} 66 */ 67 config.isPreview = false; 68 69 /** 70 * [viewPcBySp description] 71 * @type {Boolean} 72 */ 73 config.viewPcBySp = false; 74 75 /** 76 * ã¿ãã¬ãã端æ«ã®åæè¡¨ç¤ºãSP表示ã«ããã 77 * @type {Boolean} 78 */ 79 config.viewSpByTb = false; 80 81 return { 82 /** 83 * ã¬ã¤ã¢ã¦ãã¿ã¤ãæå® 84 * @public 85 * @return ã¢ã¸ã¥ã¼ã«(â»ã¡ã½ãããã§ã¼ã³ç¨) 86 */ 87 setLyaoutType: function (type) { 88 config.layoutType = type; 89 return MutualSwitching.config; 90 }, 91 /** 92 * ã¬ã¹ãã³ã·ãã¬ã¤ã¢ã¦ãã§ãããã¨ãå®ç¾©ãã 93 * @public 94 * @return ã¢ã¸ã¥ã¼ã«(â»ã¡ã½ãããã§ã¼ã³ç¨) 95 */ 96 setLayoutIsResponsive: function () { 97 config.layoutType = 0; 98 return MutualSwitching.config; 99 }, 100 /** 101 * åå¥(ããã¤ã¹å¥)ã¬ã¤ã¢ã¦ãã§ãããã¨ãå®ç¾©ãã 102 * @public 103 * @return ã¢ã¸ã¥ã¼ã«(â»ã¡ã½ãããã§ã¼ã³ç¨) 104 */ 105 setLayoutIsIndividual: function () { 106 config.layoutType = 1; 107 return MutualSwitching.config; 108 }, 109 /** 110 * ãã¬ãã·ãã«(ãªããã + ã¬ã¹ãã³ã·ã)ã¬ã¤ã¢ã¦ãã§ãããã¨ãå®ç¾©ãã 111 * @public 112 * @return ã¢ã¸ã¥ã¼ã«(â»ã¡ã½ãããã§ã¼ã³ç¨) 113 */ 114 setLayoutIsFlexible: function () { 115 config.layoutType = 2; 116 return MutualSwitching.config; 117 }, 118 /** 119 * åå¥è¨å®ããã¤ãã¹ãç»é²ãã 120 * @public 121 * @param {Object} pathSetting JSONå½¢å¼ 122 * @return ã¢ã¸ã¥ã¼ã«(â»ã¡ã½ãããã§ã¼ã³ç¨) 123 */ 124 setPathSettings: function (pathSetting) { 125 config.pathSettings = pathSetting; 126 return MutualSwitching.config; 127 }, 128 /** 129 * PCç¨ãã¥ã¼ãã¼ãã®å¹ ãè¨å®ãã 130 * @public 131 * @param {Int} width å¹ 132 * @return ã¢ã¸ã¥ã¼ã«(â»ã¡ã½ãããã§ã¼ã³ç¨) 133 */ 134 setViewPortWIdthPc: function (width) { 135 config.viewPortWidthPc = width; 136 return MutualSwitching.config; 137 }, 138 /** 139 * ã¹ããç¨ãã¥ã¼ãã¼ãã®å¹ ãè¨å®ãã 140 * @public 141 * @param {Int} width å¹ 142 * @return ã¢ã¸ã¥ã¼ã«(â»ã¡ã½ãããã§ã¼ã³ç¨) 143 */ 144 setViewPortWIdthSp: function (width) { 145 config.viewPortWidthSp = width; 146 return MutualSwitching.config; 147 }, 148 /** 149 * [setViewPcBySp description] 150 * @return ã¢ã¸ã¥ã¼ã«(â»ã¡ã½ãããã§ã¼ã³ç¨) 151 */ 152 setViewPcBySp: function () { 153 config.viewPcBySp = true; 154 return MutualSwitching.config; 155 }, 156 /** 157 * ã¿ãã¬ãã端æ«ã®åæè¡¨ç¤ºãSP表示ã«ãã 158 * @param {Boolean} bool true: SP表示, false: PC表示 159 * @return ã¢ã¸ã¥ã¼ã«(â»ã¡ã½ãããã§ã¼ã³ç¨) 160 */
161 setViewSpByTb: function (bool) { 162 config.viewSpByTb = bool; 163 return MutualSwitching.config; 164 }, 165 /** 166 * ã¹ããç¨ãã¼ã¸ãåå¨ãèªèãããè¨å® 167 * @param {Boolean} existsFlag true: åå¨ãã, false: åå¨ããªã 168 * @return ã¢ã¸ã¥ã¼ã«(â»ã¡ã½ãããã§ã¼ã³ç¨) 169 */ 170 setExistsSpPage: function (existsFlag) { 171 config.existsSpPage = existsFlag; 172 return MutualSwitching.config; 173 }, 174 /** 175 * ãã¬ãã¥ã¼ç»é¢ãã©ããã夿ããè¨å® 176 * @param {Boolean} isPreview true: ãã¬ãã¥ã¼, false: ãã®ä» 177 * @return ã¢ã¸ã¥ã¼ã«(â»ã¡ã½ãããã§ã¼ã³ç¨) 178 */ 179 setPreviewMode: function (isPreview) { 180 config.isPreview = isPreview; 181 return MutualSwitching.config; 182 }, 183 /** 184 * ã¬ã¹ãã³ã·ãã¬ã¤ã¢ã¦ãã§ããã 185 * @public 186 * @return {Boolean} true: ã¬ã¹ãã³ã·ãã¬ã¤ã¢ã¦ã, false: ãã®ä» 187 */ 188 isResponsiveLayout: function () { 189 return config.layoutType === 0; 190 }, 191 /** 192 * åå¥ã¬ã¤ã¢ã¦ãã§ããã 193 * @public 194 * @return {Boolean} true: åå¥ã¬ã¤ã¢ã¦ã, false: ãã®ä» 195 */ 196 isIndividualLayout: function () { 197 return config.layoutType === 1; 198 }, 199 /** 200 * ãã¬ãã·ãã«ã¬ã¤ã¢ã¦ãã§ããã 201 * @public 202 * @return {Boolean} true: ãã¬ãã·ãã«ã¬ã¤ã¢ã¦ã, false: ãã®ä» 203 */ 204 isFlexibleLayout: function () { 205 return config.layoutType === 2; 206 }, 207 /** 208 * PCç¨ãã¥ã¼ãã¼ãã®å¹ ãåå¾ 209 * @public 210 * @return {Int} å¹ 211 */ 212 getViewPortWidthPc: function () { 213 return config.viewPortWidthPc; 214 }, 215 /** 216 * ã¹ããç¨ãã¥ã¼ãã¼ãã®å¹ ãåå¾ 217 * @public 218 * @return {Int} å¹ 219 */ 220 getViewPortWidthSp: function () { 221 return config.viewPortWidthSp; 222 }, 223 /** 224 * PCã¬ã¤ã¢ã¦ãæã®ãã¥ã¼ãã¼ãå¤ãåå¾ 225 * @public 226 * @return {String} ãã¥ã¼ãã¼ãå¤ 227 */ 228 getViewPortPc: function () { 229 return 'width=' + config.viewPortWidthPc + ',user-scalable=yes'; 230 }, 231 /** 232 * ã¹ããã¬ã¤ã¢ã¦ãæã®ãã¥ã¼ãã¼ãå¤ãåå¾ 233 * @public 234 * @return {String} ãã¥ã¼ãã¼ãå¤ 235 */ 236 getViewPortSp: function () { 237 return 'width=' + config.viewPortWidthSp + ',user-scalable=yes'; 238 }, 239 /** 240 * ãã¬ãã·ãã«ã¬ã¤ã¢ã¦ãæã®ãã¥ã¼ãã¼ãå¤ãåå¾ 241 * @public 242 * @return {String} ãã¥ã¼ãã¼ãå¤ 243 */ 244 getViewPortFlexible: function () { 245 return 'width=device-width, maximum-scale=1.0, minimum-scale=0.5,user-scalable=yes,initial-scale=1.0'; 246 }, 247 /** 248 * ãã¹æ¯ã®è¨å®ãåå¾ 249 * @public 250 * @return {Object} ãã¹ã¨è¨å®ãã¼ã¿ 251 */ 252 getPathSettings: function () { 253 return config.pathSettings; 254 }, 255 /** 256 * PCç¨CSSãã¡ã¤ã«åãåå¾ 257 * @public 258 * @return {String} ãã¡ã¤ã«å 259 */ 260 getPcCssName: function () { 261 return config.pcCssName; 262 }, 263 /** 264 * ã¹ããç¨CSSãã¡ã¤ã«åãåå¾ 265 * @public 266 * @return {String} ãã¡ã¤ã«å 267 */ 268 getSpCssName: function () { 269 return config.spCssName; 270 }, 271 /** 272 * [getViewPcBySp description] 273 * @return {[type]} [description] 274 */ 275 getViewPcBySp: function () { 276 return config.viewPcBySp; 277 }, 278 /** 279 * ã¿ãã¬ãã端æ«ã®åæè¡¨ç¤ºãSP表示ã«ããã 280 * @return {Boolean} 281 */ 282 getViewSpByTb: function () { 283 return config.viewSpByTb; 284 }, 285 /** 286 * ã¹ããç¨ãã¼ã¸ãåå¨ããã 287 * @return {Boolean} 288 */ 289 isExistsSpPage: function () { 290 return config.existsSpPage; 291 }, 292 /** 293 * ãã¬ãã¥ã¼ç»é¢ã§ã®é²è¦§ãã©ãã 294 * @return {Boolean} [description] 295 */ 296 isPreviewMode: function () { 297 return config.isPreview; 298 } 299 } 300})(); 301 302//============================================================================== 303// ã¦ã¼ãã£ãªãã£ã¢ã¸ã¥ã¼ã« 304//============================================================================== 305MutualSwitching.util = (function () { 306 return { 307 /** 308 * ãã¡ã¤ã³åãåå¾ 309 * @public 310 * @return {String} ãã¡ã¤ã³å 311 */ 312 getDomain: function () { 313 return document.domain; 314 }, 315 /** 316 * ãã£ã¬ã¯ããªãã¹(URL)ãåå¾ 317 * @public 318 * @return {String} ãã¹ 319 */ 320 getFileName: function () { 321 return location.pathname.split('/').pop(); 322 }, 323 /** 324 * èªèº«ã®ãã¼ã¸ãã¡ã¤ã«åãåå¾ 325 * @public 326 * @return {String} ãã¡ã¤ã«å 327 */ 328 getDirPath: function () { 329 return location.pathname.replace(MutualSwitching.util.getFileName(), '').replace(/\/$/, ''); 330 }, 331 /** 332 * ã¦ã¼ã¶ã¼ã¨ã¼ã¸ã§ã³ããã¹ãããå¤å® 333 * @public 334 * @return {Boolean} 335 */ 336 isUaSp: function () { 337 // ã¦ã¼ã¶ã¼ã¨ã¼ã¸ã§ã³ãåå¾ 338 var ua = navigator.userAgent.toLowerCase(); 339 return (ua.indexOf('iphone') > -1) || (ua.indexOf('android') > -1 && ua.indexOf('mobile') > -1); 340 }, 341 /** 342 * ã¦ã¼ã¶ã¼ã¨ã¼ã¸ã§ã³ããã¿ãã¬ãããå¤å® 343 * @public 344 * @return {Boolean} 345 */ 346 isUaTb: function () { 347 // ã¦ã¼ã¶ã¼ã¨ã¼ã¸ã§ã³ãåå¾ 348 var ua = navigator.userAgent.toLowerCase(); 349 return (ua.indexOf('ipad') > -1) || (ua.indexOf('macintosh') > -1 && 'ontouchend' in document) || (ua.indexOf('android') > -1 && ua.indexOf('mobile') === -1); 350 }, 351 /** 352 * é²è¦§ç«¯æ«ãã¹ããã§ãã 353 * @return {Boolean} true: ã¹ãã, false:ãã®ä» 354 */ 355 isDeviceSp: function () { 356 // ã¿ãã¬ãã端æ«ã®åæè¡¨ç¤ºãSP表示ã«ããå ´åãã¿ãã¬ãã端æ«ãã¹ãã端æ«ã¨ãã¦è¿ã 357 if(MutualSwitching.config.getViewSpByTb()) { 358 return MutualSwitching.util.isUaSp() || MutualSwitching.util.isUaTb(); 359 } else { 360 return MutualSwitching.util.isUaSp(); 361 } 362 }, 363 /** 364 * é²è¦§ç«¯æ«ãã¿ãã¬ããã§ãã 365 * @return {Boolean} true: ã¿ãã¬ãã, false:ãã®ä» 366 */ 367 isDeviceTb: function () { 368 // ã¿ãã¬ãã端æ«ã®åæè¡¨ç¤ºãSP表示ã«ããå ´åãfalseãè¿ã 369 if(MutualSwitching.config.getViewSpByTb()) { 370 return false; 371 } else { 372 return MutualSwitching.util.isUaTb(); 373 } 374 }, 375 /** 376 * ãããã°æ å ±æç» 377 * @public 378 * @return {[type]} [description] 379 */ 380 debugPrint: function () { 381 $('#debug').text($("meta[name='viewport']").attr('content')); 382 } 383 }; 384})(); 385 386//============================================================================== 387// ã¡ã¤ã³å¦çã¢ã¸ã¥ã¼ã« 388//============================================================================== 389MutualSwitching.run = (function () { 390 // jQueryèªè¾¼ã¿ç¢ºèª 391 if (typeof $ === "undefined") { 392 console.warn("jQuery required."); 393 return; 394 } 395 396 // Cookieå©ç¨ã®å¯å¦ãç¢ºèª 397 if (!navigator.cookieEnabled) { 398 console.warn("Please allow use of cookies."); 399 return; 400 } 401 402 /** 403 * ãã¥ã¼ãã¼ãæ¸æã 404 * @private 405 * @param {String} value ãã¥ã¼ãã¼ãè¨å® 406 */ 407 function rewriteViewPort(value) { 408 var srcViewPort = $("meta[name='viewport']").attr('content'); 409 var destViewPort = value; 410 if (srcViewPort !== destViewPort) { 411 $("meta[name='viewport']").attr('content', destViewPort); 412 } 413 } 414 415 /** 416 * PCç¨CSSã®èªè¾¼ã¿ãã¹ããç¨CSSèªè¾¼ã¿ã«æ¸æã 417 * @private 418 */ 419 function rewriteCssPcToSp() { 420 var deviceCss = $("link[href$='/" + MutualSwitching.config.getPcCssName() + "']"); 421 if (deviceCss.attr('href') != null) { 422 var deviceCssDest = deviceCss.attr('href').replace(MutualSwitching.config.getPcCssName(), MutualSwitching.config.getSpCssName()); 423 deviceCss.attr('href', deviceCssDest); 424 } 425 } 426 427 /** 428 * PCç¨ãã¶ã¤ã³ã§ãã¼ã¸ãé²è¦§ãã¦ããã 429 * @private 430 * @return {Boolean} true: PCãã¶ã¤ã³, false: ããä»¥å¤ 431 */ 432 function isPcView() { 433 return $.cookie('view_mode') === 'pc'; 434 } 435 436 /** 437 * ã¹ããç¨ãã¶ã¤ã³ã§ãã¼ã¸ãé²è¦§ãã¦ããã 438 * @private 439 * @return {Boolean} true: ã¹ãããã¶ã¤ã³, false: ããä»¥å¤ 440 */ 441 function isSpView() { 442 return $.cookie('view_mode') === 'sp'; 443 } 444 445 /** 446 * cookieã«view_modeãããã 447 * @private 448 * @return {Boolean} true: ãã, false: ãªã 449 */ 450 function hasViewMode() { 451 return !!$.cookie('view_mode'); 452 } 453 454 /** 455 * PCãã¼ã¸ããSPãã¼ã¸ã¸ã®ãªãã¤ã¬ã¯ãURLãåå¾ãã 456 * @private 457 * @return {String} ãªãã¤ã¬ã¯ãå URL 458 */ 459 function getRedirectUrlPcToSp() { 460 var redirectUrl; 461 if (location.href.split('/').pop().length === 0) { 462 redirectUrl = 'index.html'; 463 } else { 464 redirectUrl = location.href.split('/').pop(); 465 } 466 return redirectUrl; 467 } 468 469 /** 470 * ãã¹æ¯ã«è¨å®ãããã¬ã¤ã¢ã¦ãæ å ±ãè¨å®ãã 471 * @private 472 * @return {[type]} [description] 473 */ 474 function applySettingsForEachPath() { 475 var settings = MutualSwitching.config.getPathSettings();
476 if (!settings) { 477 return; 478 } 479 480 // èªèº«ã®ãã¹ããé¡ã£ã¦è¨å®ãæ¢ã 481 var pathParts = MutualSwitching.util.getDirPath().split('/'); 482 for (var ii = pathParts.length - 1; ii >= 0; ii--) { 483 var searchPath = ''; 484 var tmpPathParts = []; 485 for (var jj = 0; jj <= ii; jj++) { 486 tmpPathParts.push(pathParts[jj]); 487 } 488 searchPath = tmpPathParts.join('/').length > 0 ? tmpPathParts.join('/') : '/'; 489 490 // å奿å®ããã¦ãã 491 if (settings.hasOwnProperty(searchPath)) { 492 // ã¬ã¤ã¢ã¦ããæå®ããã¦ããã°é©ç¨ãã 493 if (settings[searchPath].layout_type != null) { 494 MutualSwitching.config.setLyaoutType(settings[searchPath].layout_type); 495 } 496 497 // PCç¨Widthãè¨å®ããã¦ããã°é©ç¨ãã 498 if (settings[searchPath].pc_width != null) { 499 MutualSwitching.config.setViewPortWIdthPc(settings[searchPath].pc_width); 500 } 501 502 // ã¹ããç¨Widthãè¨å®ããã¦ããã°é©ç¨ãã 503 if (settings[searchPath].sp_width != null) { 504 MutualSwitching.config.setViewPortWIdthSp(settings[searchPath].sp_width); 505 } 506 507 // ã¿ãã¬ãã端æ«ã®åæè¡¨ç¤ºãã¹ãã表示ã«ããè¨å® 508 if (settings[searchPath].viewSpByTb != null) { 509 MutualSwitching.config.setViewSpByTb(settings[searchPath].viewSpByTb); 510 } 511 break; 512 } 513 } 514 } 515 516 return { 517 /** 518 * ã¡ã¤ã³å¦ç 519 * @public 520 */ 521 ready: function () { 522 $(document).ready(function () { 523 // ãããã° 524 MutualSwitching.util.debugPrint(); 525 526 // PCãµã¤ã表示ãå®è¡ 527 $('.jqs-go-to-pc').on({ 528 'click': function () { 529 $.cookie('view_mode', 'pc', {expires: 0, path: '/', domain: MutualSwitching.util.getDomain()}); 530 } 531 }); 532 533 // ã¹ãããµã¤ã表示ãå®è¡ 534 $('.jqs-go-to-sp').on({ 535 'click': function () { 536 $.cookie('view_mode', 'sp', {expires: 0, path: '/', domain: MutualSwitching.util.getDomain()}); 537 } 538 }); 539 540 // ãã¹æ¯ã«å®ç¾©ãããè¨å®ãé©ç¨ãã 541 applySettingsForEachPath(); 542 543 // ãã¬ãã¥ã¼ç»é¢ããé²è¦§ä¸ 544 if (MutualSwitching.config.isPreviewMode()) { 545 if (MutualSwitching.config.isFlexibleLayout()) { 546 //------------------------------------------------------------------ 547 // ãã¬ãã·ãã«ã¬ã¤ã¢ã¦ã 548 //------------------------------------------------------------------ 549 // ãã¥ã¼ãã¼ãæ¸æã 550 rewriteViewPort(MutualSwitching.config.getViewPortFlexible()); 551 } else if (MutualSwitching.config.isIndividualLayout()) { 552 // CSSæ¸æã 553 rewriteCssPcToSp(); 554 // ãã¥ã¼ãã¼ãæ¸æã 555 rewriteViewPort(MutualSwitching.config.getViewPortSp()); 556 } else { 557 //------------------------------------------------------------------ 558 // ã¬ã¹ãã³ã·ãã¬ã¤ã¢ã¦ã 559 //------------------------------------------------------------------ 560 // ãã¥ã¼ãã¼ãæ¸æã 561 rewriteViewPort(MutualSwitching.config.getViewPortSp()); 562 } 563 } 564 565 // PCãã¼ã¸é²è¦§ä¸ 566 if ((isPcView() && MutualSwitching.util.isDeviceSp()) || ((isPcView() || !hasViewMode()) && MutualSwitching.util.isDeviceTb())) { 567 // ã¹ãããã¼ã¸ã¸ã®åæ¿ãã¿ã³è¡¨ç¤º 568 $('.jqs-go-to-sp').show(); 569 // ã¬ã¤ã¢ã¦ãã®ç¨®é¡ã§åå² 570 if (MutualSwitching.config.isFlexibleLayout()) { 571 //------------------------------------------------------------------ 572 // ãã¬ãã·ãã«ã¬ã¤ã¢ã¦ã 573 //------------------------------------------------------------------ 574 // ãã¥ã¼ãã¼ãæ¸æã 575 rewriteViewPort(MutualSwitching.config.getViewPortFlexible()); 576 } else if (MutualSwitching.config.isIndividualLayout()) { 577 //------------------------------------------------------------------ 578 // åå¥ã¬ã¤ã¢ã¦ã 579 //------------------------------------------------------------------ 580 // ãã¥ã¼ãã¼ãæ¸æã 581 rewriteViewPort(MutualSwitching.config.getViewPortSp()); 582 } else { 583 //------------------------------------------------------------------ 584 // ã¬ã¹ãã³ã·ãã¬ã¤ã¢ã¦ã 585 //------------------------------------------------------------------ 586 // ãã¥ã¼ãã¼ãæ¸æã 587 rewriteViewPort(MutualSwitching.config.getViewPortPc()); 588 } 589 } 590 591 // ã¹ãããã¼ã¸é²è¦§ä¸ 592 if (((isSpView() || !hasViewMode()) && MutualSwitching.util.isDeviceSp()) || (isSpView() && MutualSwitching.util.isDeviceTb())) { 593 // ã¬ã¤ã¢ã¦ãã®ç¨®é¡ã§åå² 594 if (MutualSwitching.config.isFlexibleLayout()) { 595 //------------------------------------------------------------------ 596 // ãã¬ãã·ãã«ã¬ã¤ã¢ã¦ã 597 //------------------------------------------------------------------ 598 // ãã¥ã¼ãã¼ãæ¸æã 599 rewriteViewPort(MutualSwitching.config.getViewPortFlexible()); 600 } else if (MutualSwitching.config.isIndividualLayout()) { 601 //------------------------------------------------------------------ 602 // åå¥ã¬ã¤ã¢ã¦ã 603 //------------------------------------------------------------------
604 // PCãã¼ã¸ã¸ã®åæ¿ãã¿ã³è¡¨ç¤º 605 $('.jqs-go-to-pc').show(); 606 607 if (MutualSwitching.config.getViewPcBySp()) { 608 if (location.href.indexOf('.sp.') <= 0 && MutualSwitching.config.isExistsSpPage()) { 609 $.cookie('view_mode', 'sp', {expires: 0, path: '/', domain: MutualSwitching.util.getDomain()}); 610 location.href = getRedirectUrlPcToSp().replace('.html', '.sp.html'); 611 } else { 612 // CSSæ¸æã 613 rewriteCssPcToSp(); 614 // ãã¥ã¼ãã¼ãæ¸æã 615 rewriteViewPort(MutualSwitching.config.getViewPortSp()); 616 } 617 } else if (MutualSwitching.config.isExistsSpPage && (location.href.indexOf('.sp.') <= 0)) { 618 location.href = getRedirectUrlPcToSp().replace('.html', '.sp.html'); 619 } else { 620 // CSSæ¸æã 621 rewriteCssPcToSp(); 622 // ãã¥ã¼ãã¼ãæ¸æã 623 rewriteViewPort(MutualSwitching.config.getViewPortSp()); 624 } 625 } else { 626 //------------------------------------------------------------------ 627 // ã¬ã¹ãã³ã·ãã¬ã¤ã¢ã¦ã 628 //------------------------------------------------------------------ 629 // ãã¥ã¼ãã¼ãæ¸æã 630 rewriteViewPort(MutualSwitching.config.getViewPortSp()); 631 } 632 } 633 }); 634 } 635 }; 636})();
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.