1/** 2 * 3 * tableã®å¹ ãã³ã³ãã³ãå¹ ãè¶ããã¨ãã®å¦çï¼ä¸»ã«ã¹ããã§è¦ãéï¼ 4 * @param {string} target element "#{target}" or ".{target}" 5 * 6 */ 7 8import { elementSelector } from "./elementSelector.js"; 9 10export function swipeTable(target) { 11 const $target = elementSelector(target); 12 if (!$target) { 13 return; 14 } 15 const targetW = $target.clientWidth; 16 const $table = elementSelector("table", "all"); 17 18 console.log(targetW); 19 [...$table].map(function (el, index) { 20 console.log($table[index].className); 21 if (el.clientWidth > targetW && $table[index].className == "ta-swipe--ignore") { 22 console.log(targetW); 23 el.outerHTML = '<div class="ta-swipe">' + el.outerHTML + "</div>"; 24 } 25 }); 26 const $swipeTable = elementSelector(".ta-swipe", "all"); 27 [...$swipeTable].map(function (el) { 28 el.insertAdjacentHTML("beforebegin", '<div class="bg-black text-center py-2 text-white"><i class="fas fa-arrows-alt-h"></i>\u5de6\u53f3\u306b\u30b9\u30af\u30ed\u30fc\u30eb\u3067\u304d\u307e\u3059\u3002</div>'); 29 }); 30}
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.