Memasang Fungsi Sticky Pada Menu Horizontal
A Pen by Arlina Design on CodePen.
| // Inspired by https://twitter.com/coderitual/status/1112297299307384833 and https://tapajyoti-bose.medium.com/7-killer-one-liners-in-javascript-33db6798f5bf | |
| // Remove any duplicates from an array of primitives. | |
| const unique = [...new Set(arr)] | |
| // Sleep in async functions. Use: await sleep(2000). | |
| const sleep = (ms) => (new Promise(resolve => setTimeout(resolve, ms))); | |
| // or | |
| const sleep = util.promisify(setTimeout); |
| // 在瀏覽器網址列輸入以下程式碼,或者是新增一個我的最愛項目,把網址的內容改為以下即可。 | |
| // 搜尋currentEncoding=2,targetEncoding=1 (簡轉繁)反之(繁轉簡)請自行修改 | |
| javascript:"use strict";var ts=document.createElement("script");ts.setAttribute("src","https://52.197.103.234/chinese_convert.js");var _document$getElements=document.getElementsByTagName("head"),head=_document$getElements[0];head.appendChild(ts),ts.onload=function(){currentEncoding=2,targetEncoding=1,translateBody()}; |
| // Example "姓名" (姓名) | |
| // it can be used for placehoder of input | |
| "姓名".charCodeAt(0) | |
| > 22995 | |
| "姓名".charCodeAt(1) | |
| > 21517 | |
| "姓名".charCodeAt(0).toString(16) | |
| > "59d3" |
| osascript -e "tell application \"Finder\" to quit" && defaults write com.apple.finder DisableAllAnimations -bool false && defaults write com.apple.finder AnimateWindowZoom -bool true && defaults write com.apple.finder TotalFinderDontFixInstallerDefaults -bool true |