PageSourceSearch

https://cdn.mainichi.jp/vol1/js/v2/pc/tools_pc.js?202605

js mainichi.jp collected 2026-09-24 08:24:12 UTC 2,190 bytes, 54 lines download raw bytes

1////////////////////////////////////
2// articles page  //////////////////
3////////////////////////////////////
4
5    
6$(function () {
7
8    // articletoolのSNSボタン
9	var url = $("link[rel='canonical']").eq(0).attr('href');
10	if(url){
11		url = url.replace(/stg\./g,'');
12	}
13	var num = 0;
14
15	var eurl   = encodeURI(url);
16	var eurlc  = encodeURIComponent(url);
17	var etitle = encodeURIComponent(document.title);
18	//var tweet  = encodeURIComponent(document.title + " ") + eurl;
19
20    //X(twitter)
21	$('.tool-twitter').wrapInner('<a class="tool-twitter-button" href="https://x.com/intent/tweet?text=' + etitle + '&url=' + eurlc + '" target="_blank" rel="noopener noreferrer" data-sns="twitter" data-snsaction="share" aria-label="X(旧Twitter)ポスト"></a>');
22
23    //X(twitter) timeline
24    $('.tool-twitter-timeline').wrapInner('<a class="tool-twitter-button" href="https://x.com/search?q=url:' + eurlc + '&f=live" target="_blank" rel="noopener noreferrer" data-sns="twitter" data-snsaction="timeline" aria-label="X(旧Twitter)みんなのポストを見る"></a>');
25    
26    //facebook
27	$('.tool-facebook').wrapInner('<a class="tool-facebook-button" href="//www.facebook.com/share.php?u=' + eurlc + '" target="_blank" rel="noopener noreferrer" data-sns="facebook" data-snsaction="share" aria-label="Facebook シェア"></a>');
28    
29    //はてブ
30	$('.tool-hatebu').wrapInner('<a class="tool-hatebu-button" href="//b.hatena.ne.jp/entry/' + eurl + '" target="_blank" rel="noopener noreferrer" data-sns="hatena-bookmark" data-snsaction="share" aria-label="はてなブックマーク"></a>');
31
32
33    //ページのURLをコピー
34    const undotext = function(){
35        $('.tool-link-text').text("リンク").css('display','');
36    }
37    
38    $('.tool-link > a').click(function(e){
39        e.preventDefault();
40        const url = location.href;
41        navigator.clipboard.writeText(url);
42        $('.tool-link-text').text("リンクをコピーしました").css('display','block');
43        
44        setTimeout(undotext, 2000);
45    });
46
47
48    //ページを印刷
49        $('.tool-print > a').click(function(e){
50        e.preventDefault();
51        window.print();
52        });
53        
54});

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.