1/*------------------------------------------------------------------------- 2 ã»ãã¥ãªãã£å¯¾çã®ãããtarget="_blank"ã®aã¿ã°ã« 3 "noopener noreferrer"ã®rel屿§ãèªåã§ä»ä¸ãã 4-------------------------------------------------------------------------*/ 5function ready(fn) { 6 if (document.readyState != 'loading') { 7 fn(); 8 } else if (document.addEventListener) { 9 document.addEventListener('DOMContentLoaded', fn); 10 } else { 11 document.attachEvent('onreadystatechange', function() { 12 if (document.readyState != 'loading') 13 fn(); 14 }); 15 } 16} 17 18ready(function(){ 19 var aTags = [].slice.call(document.getElementsByTagName('a')); 20 var userAgent = window.navigator.userAgent.toLowerCase(); 21 var isIE = (~userAgent.indexOf('msie') || ~userAgent.indexOf('trident')); 22 if (!isIE) { 23 aTags.forEach(function (el) { 24 if (el.target === '_blank') { 25 var rels = el.rel.split(' '); 26 if (!~rels.indexOf('noopener')) { 27 rels.push('noopener'); 28 el.setAttribute('rel', rels.join(' ').trim()); 29 } 30 if (!~rels.indexOf('noreferrer')) { 31 rels.push('noreferrer'); 32 el.setAttribute('rel', rels.join(' ').trim()); 33 } 34 } 35 }); 36 } 37});
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.