Upgrade to Pro — share decks privately, control downloads, hide ads and more …

勝手にサービスをカスタマイズ、簡単な仕事効率化術 / Improve productivity

shoito
September 03, 2019

勝手にサービスをカスタマイズ、簡単な仕事効率化術 / Improve productivity

Chrome拡張を作って/使って勝手にサービスをカスタマイズ、簡単な仕事効率化術。

shoito

September 03, 2019
Tweet

More Decks by shoito

Other Decks in Technology

Transcript

  1. (() => {
 // ΠϯΫϦϝϯλϧαʔν༻ͷinputϑΟʔϧυ௥Ճ const appendFilter = (taxonomyId, listId)

    => { const input = document.createElement("input") input.setAttribute("type", "text") input.setAttribute("placeholder", "filter") input.addEventListener("input", (event) => filterItem(listId, event.target.value)) const taxonomyDiv = document.getElementById(taxonomyId) taxonomyDiv.insertBefore(input, taxonomyDiv.firstChild) } // ΩʔϫʔυϑΟϧλϦϯάॲཧ const filterItem = (listId, keyword) => { document.querySelectorAll("#" + listId + " li").forEach((item, i, items) => { if (!item.innerText.toLowerCase().includes(keyword.toLowerCase())) { item.style = "display:none" } else { item.style = "display:list-item" } }) } appendFilter("taxonomy-category", "categorychecklist") appendFilter("taxonomy-referencecat", "referencecatchecklist") })() JOKFDUKT%FWFMPQFST*0ฤूΞγελϯτ
  2. վળલ վળޙ  ඵº೔݄ºϲ݄ºਓ
 ɹ  ඵ ɹ ෼
 ɹ࣌ؒ


    
   ԁ݄×೔݄×࣌ؒ
 ɹ ԁ࣌
 
  ԁ࣌º࣌ؒ  ԁ೥ ※਺஋͸ܭࢉͷͨΊͷՍۭͷ΋ͷͰ͢