良い wayspots copy

    @@ -22,5 +22,5 @@ textarea.select(); document.execCommand('copy'); textarea.remove(); -window.prompt(`Wayspot情報をクリップボードにコピーしました`, msg) +window.prompt(`良いWayspots報告フォームのリンクをクリップボードにコピーしました`, msg) })()
  • /*
     * @title 良い wayspots copy
     * @description my bookmarklet
     * @include http://*
     * @license MIT License
     * @require 
     * @javascript_url 
     */
    (function(){
    var title = encodeURIComponent(document.getElementsByClassName('showcase-item__title')[0].childNodes[0].textContent);
    var addr = encodeURIComponent(document.getElementsByClassName('showcase-item__address')[0].childNodes[0].textContent);
    var map = document.getElementsByClassName('showcase-item__map')[0].childNodes[0].childNodes[0].attributes.getNamedItem('style').value;
    var latlng = new RegExp(/\d+\.\d+/, 'g');
    var intelurl = encodeURIComponent(`https://intel.ingress.com/intel?pll=${latlng.exec(map)[0]},${latlng.exec(map)[0]}`);
    
    
    msg = `https://docs.google.com/forms/d/e/1FAIpQLSeeV_9VlQFflQVX9XttolziHMHVAc3Fea-Mgk19Z8A9xHt7wQ/viewform?entry.1531175465=${title}&entry.746067330=${addr}&entry.1042878191=${intelurl}`;
    
    const textarea = document.createElement('textarea');
    textarea.textContent = msg;
    document.body.appendChild(textarea);
    textarea.select();
    document.execCommand('copy');
    textarea.remove();
    window.prompt(`良いWayspots報告フォームのリンクをクリップボードにコピーしました`, msg)
    })()
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。