<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns="http://purl.org/rss/1.0/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel rdf:about="https://let.hatelabo.jp/hidesato1982/rss">
    <link>https://let.hatelabo.jp/hidesato1982/rss</link>
    <description></description>
    <title>Bookmarklets from hidesato1982</title>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="https://let.hatelabo.jp/hidesato1982/let/lev74dmSgaAA"/>
        <rdf:li rdf:resource="https://let.hatelabo.jp/hidesato1982/let/lev7w_iOgaAA"/>
      </rdf:Seq>
    </items>
  </channel>
  <item rdf:about="https://let.hatelabo.jp/hidesato1982/let/lev74dmSgaAA">
    <link>https://let.hatelabo.jp/hidesato1982/let/lev74dmSgaAA</link>
    <dc:date>2026-11-22T09:12:04Z</dc:date>
    <description>GGのレッスン検索時の店舗を絞り込む</description>
    <dc:creator>hidesato1982</dc:creator>
    <title>[Let] GG店舗絞り込み</title>
    <content:encoded>&lt;a href="javascript:%22https%3A%2F%2Flet.st-hatelabo.com%2Fhidesato1982%2Flet%2Flev74dmSgaAA.bookmarklet.js%20%28arg%29%22.replace%28%2F%28%5CS%2B%29%5Cs%2B%28%5CS%2A%29%2F%2Cfunction%28s%2Curl%2Carg%29%7Bs%3Ddocument.createElement%28%22script%22%29%3Bs.charset%3D%22utf-8%22%3Bs.src%3Durl%2B%22%3Fs%3D%22%2BencodeURIComponent%28arg%29%3Bdocument.body.appendChild%28s%29%7D%29%3Bvoid%280%29%3B"&gt;GG店舗絞り込み&lt;/a&gt;&lt;pre&gt;/*
 * @title GG店舗絞り込み
 * @description GGのレッスン検索時の店舗を絞り込む
 * @include http://*
 * @license MIT License
 * @require 
 */
javascript:(function(){
    /* ストレージから登録済みの店舗リストを取得 */
    const savedData = JSON.parse(localStorage.getItem('BM_MISE_LIST_goldgym') || '[]');
    
    if (savedData.length === 0) {
        return alert('ストレージに登録されている店舗がありません。\n先に管理ツールで登録してください。');
    }
    const select = document.querySelector('select[name=\'mise_cd\']');    /* 対象のセレクトボックスを取得 */
    if (select) {
        /* 全てのoption要素をループしてチェック */
        Array.from(select.options).forEach(opt =&amp;gt; {
            if (!savedData.includes(opt.text)) {/* ストレージのリストに含まれていない場合は削除 */
                opt.remove();
            }
        });
    } else {
        alert('対象のセレクトボックスが見つかりません');
    }
})();&lt;/pre&gt;</content:encoded>
  </item>
  <item rdf:about="https://let.hatelabo.jp/hidesato1982/let/lev7w_iOgaAA">
    <link>https://let.hatelabo.jp/hidesato1982/let/lev7w_iOgaAA</link>
    <dc:date>2026-11-22T09:08:01Z</dc:date>
    <description>GGレッスンの検索時の絞り込む店舗を編集する</description>
    <dc:creator>hidesato1982</dc:creator>
    <title>[Let] GG店舗選択</title>
    <content:encoded>&lt;a href="javascript:%22https%3A%2F%2Flet.st-hatelabo.com%2Fhidesato1982%2Flet%2Flev7w_iOgaAA.bookmarklet.js%20%28arg%29%22.replace%28%2F%28%5CS%2B%29%5Cs%2B%28%5CS%2A%29%2F%2Cfunction%28s%2Curl%2Carg%29%7Bs%3Ddocument.createElement%28%22script%22%29%3Bs.charset%3D%22utf-8%22%3Bs.src%3Durl%2B%22%3Fs%3D%22%2BencodeURIComponent%28arg%29%3Bdocument.body.appendChild%28s%29%7D%29%3Bvoid%280%29%3B"&gt;GG店舗選択&lt;/a&gt;&lt;pre&gt;/*
 * @title GG店舗選択
 * @description GGレッスンの検索時の絞り込む店舗を編集する
 * @include http://*
 * @license MIT License
 * @require 
 */


javascript:(function(){
    const key = 'BM_MISE_LIST_goldgym';    /* ローカルストレージのキー名 */
    
    /* 既にパネルが開いている場合は一度削除する */
    const existUI = document.getElementById('bm-ui');
    if (existUI) existUI.remove();

    /* 画面のパネル(div)を作成 */
    const box = document.createElement('div');
    box.id = 'bm-ui';
    box.style.cssText = 'position:fixed;top:20px;right:20px;background:#f9f9f9;border:1px solid #999;padding:10px;z-index:99999;width:250px;box-shadow:0 4px 6px rgba(0,0,0,0.3);border-radius:5px;color:#333;font-size:14px;';
    
    box.innerHTML = '&amp;lt;div style=\'display:flex;justify-content:space-between;margin-bottom:8px;\'&amp;gt;&amp;lt;b&amp;gt;店舗リスト管理&amp;lt;/b&amp;gt;&amp;lt;button id=\'bm-cls\' style=\'cursor:pointer;border:none;background:none;font-weight:bold;\'&amp;gt;✕&amp;lt;/button&amp;gt;&amp;lt;/div&amp;gt;'
                  + '&amp;lt;select id=\'bm-ls\' multiple style=\'width:100%;height:120px;margin-bottom:8px;border:1px solid #ccc;\'&amp;gt;&amp;lt;/select&amp;gt;'
                  + '&amp;lt;button id=\'bm-add\' style=\'width:100%;margin-bottom:5px;padding:5px;cursor:pointer;\'&amp;gt;店舗を追加&amp;lt;/button&amp;gt;'
                  + '&amp;lt;button id=\'bm-del\' style=\'width:100%;padding:5px;cursor:pointer;color:red;\'&amp;gt;店舗を削除&amp;lt;/button&amp;gt;';
    document.body.appendChild(box);

    /* ストレージからデータを読み込み、パネル内のリストを更新する関数 */
    const listSelect = document.getElementById('bm-ls');
    const renderList = () =&amp;gt; {
        listSelect.innerHTML = '';
        /* ストレージのデータを配列として取得（無ければ空配列） */
        const data = JSON.parse(localStorage.getItem(key) || '[]');
        data.forEach(name =&amp;gt; {
            const opt = document.createElement('option');
            opt.text = name;
            opt.value = name;
            listSelect.appendChild(opt);
        });
    };

    /* パネル起動時にリストを表示 */
    renderList();

    /* 閉じるボタンの処理 */
    document.getElementById('bm-cls').onclick = () =&amp;gt; box.remove();

    /* 追加ボタンの処理 */
    document.getElementById('bm-add').onclick = () =&amp;gt; {
        const targetSelect = document.querySelector('select[name=\'mise_cd\']');
        if (!targetSelect) return alert('対象のセレクトボックスが見つかりません');
        
        /* 画面のセレクトボックスで現在選択されているテキストを取得 */
        const selectedText = targetSelect.options[targetSelect.selectedIndex].text;
        
        const data = JSON.parse(localStorage.getItem(key) || '[]');
        if (!data.includes(selectedText)) {
            data.push(selectedText);
            localStorage.setItem(key, JSON.stringify(data));
            renderList(); /* 画面を更新 */
        } else {
            alert('「' + selectedText + '」はすでに登録されています');
        }
    };

    /* 削除ボタンの処理 */
    document.getElementById('bm-del').onclick = () =&amp;gt; {
        /* パネル内で選択されている項目名を取得（複数選択可） */
        const selectedValues = Array.from(listSelect.selectedOptions).map(o =&amp;gt; o.value);
        if (!selectedValues.length) return alert('削除する店舗を上のリストから選択してください');
        
        const data = JSON.parse(localStorage.getItem(key) || '[]');
        /* 選択された項目以外だけを残して保存し直す */
        const newData = data.filter(name =&amp;gt; !selectedValues.includes(name));
        localStorage.setItem(key, JSON.stringify(newData));
        renderList(); /* 画面を更新 */
    };
})();&lt;/pre&gt;</content:encoded>
  </item>
</rdf:RDF>
