1$(function() { 2 'use strict'; 3 4 var thanks = true; // ã礼ã¡ãã»ã¼ã¸ãåºãå ´åã¯trueãåºããªãå ´åã¯false 5 var folderpath = '/'; 6 // iine_appãã©ã«ããå ¥ã£ã¦ãããã¹ãããã¡ã¤ã³å以ä¸ããè¨å ¥ãã¦ãã ããã 7 // ä¸è¨ã®ä¾ã«å¾ã£ã¦ãã ããã 8 // var folderpath = '/'; --- http://example.com/iine_app/ã®å ´å 9 // var folderpath = '/site/'; --- http://example.com/site/iine_app/ã®å ´å 10 // var folderpath = 'site/folder/' --- http://example.com/site/folder/iine_app/ã®å ´å 11 12 ////// ããããä¸ã®ã¨ãªã¢ã«ã¯å¤æ´ãå ããªãã§ãã ãã /////// 13 14 var count = document.getElementById('countnum'); 15 var iine = document.getElementById('iine'); 16 var iineWrap = document.getElementById('iine_wrap'); 17 var iineThanks = document.getElementById('iine_thanks'); 18 var countNum = count.textContent; 19 var pathname = location.href; 20 21 var ajaxPath = `${location.protocol}//${location.host}${folderpath}iine_app/_ajax.php`; 22 23 var fadeout = function() { 24 setTimeout(function(){ 25 iineThanks.classList.add('fadeout'); 26 }, 6000); 27 setTimeout(function(){ 28 iineThanks.style.display = "none"; 29 iineThanks.classList.remove('fadeout'); 30 }, 7000); 31 } 32 33 $(document).ready( function(){ 34 if(localStorage.getItem(pathname) == 'checked') { 35 iineWrap.className = 'alreadychecked'; 36 } 37 38 $.ajax({ 39 type: 'GET', 40 url : ajaxPath, 41 data:{ path: pathname, mode: 'show' } 42 }).fail(function(){ 43 alert('iine.jsã®folderpathã®å¤ã確èªãã¦ä¸ããã'); 44 }).done(function(res){ 45 count.innerHTML = res; 46 }); 47 }); 48 49 50 // update 51 $(document).on('click', '#iine', function(e) { 52 e.preventDefault(); 53 if(localStorage.getItem(pathname) == 'checked') { 54 iineWrap.className = ''; 55 localStorage.removeItem(pathname); 56 // ajaxå¦ç 57 $.post(ajaxPath, { 58 path: pathname, 59 mode: 'uncheck' 60 }).fail(function(){ 61 alert('iine.jsã®folderpathã®å¤ã確èªãã¦ä¸ããã'); 62 }).done(function(res){ 63 count.innerHTML = res; 64 }); 65 } else { 66 iineWrap.className = 'checked'; 67 if(thanks === true) { 68 iineThanks.style.display = "block"; 69 fadeout(); 70 } 71 localStorage.setItem(pathname, 'checked'); 72 // ajaxå¦ç 73 $.post(ajaxPath, { 74 path: pathname, 75 mode: 'check' 76 }).fail(function(){ 77 alert('iine.jsã®folderpathã®å¤ã確èªãã¦ä¸ããã'); 78 }).done(function(res){ 79 count.innerHTML = res; 80 }); 81 } 82}); 83});
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.