Skip to content

Instantly share code, notes, and snippets.

@k08045kk
k08045kk / getCSSSelector.js
Last active February 11, 2023 12:13
Element から CSS Selector を取得する
/**
* Element から CSS Selector を取得する
* @author toshi (https://github.com/k08045kk)
* @license MIT License | https://opensource.org/licenses/MIT
* @version 1
* @since 1 - 20230211 - 初版
* @see https://www.bugbugnow.net/2023/02/get-css-selector.html
* @see https://gist.github.com/k08045kk/d239bec86ae9b06c438e7e2bf67575fb
* @param {Element} element - 要素
* @return {string} - CSS Selector
@powershell -NoProfile -ExecutionPolicy Unrestricted "&([ScriptBlock]::Create((cat \"%~f0\" | ?{$_.ReadCount -gt 1}) -join \"`n\"))" %* & goto:eof
# 上記の記述は、batコマンドです。 #
# ファイルの先頭行を無視してPowerShellで実行します。そして処理を終了します。 #
# AvoidScreenSaver.ps1 v2.2 #
# 移動量0のマウス移動イベントを周期的に発火してスクリーンセーバーを防止する。 #
# see https://www.bugbugnow.net/2020/10/avoid-screen-saver.html #
# see https://gist.github.com/k08045kk/80e46994762ae66d3a7f1219716f3ef6 #

TEST

test test test

v2