Skip to content

Commit

Permalink
ok
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaoolee authored and zhaoolee committed Sep 9, 2021
1 parent 03434d6 commit fd79366
Show file tree
Hide file tree
Showing 8 changed files with 3,519 additions and 0 deletions.
Binary file added backup/112-smart-toc.zip
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"file_hashes":[{"block_hashes":["yv95/QY1MCaoj5miHirqXrxt0vxx+hQZqGFclq0thuo="],"block_size":4096,"path":"background.js"},{"block_hashes":["iSEg2+oDGDf276CC94pLaaG3mRpuP8SXJdwUZdPvwkw=","j2d/0jakFwdhDQBNYwaTL7hZ4hymRej4dYw7UZn4qMI=","UYRoPOQKKCT6v1CUAVVwJggo/lWV3e88/0F09HyB//k=","IOK9PE7GlHEf29blQG124IvLUq3Eo/05QaoE3tL+i6c=","DfKNv5sUGQ2YZa4pwEJVr/iaOpHfvIy2nYNb2jkaxE0=","26LsJOwiFyrWwvhrIdvOiMyy2RbF3HVRX0i8QaljsBw=","y0A190w170ftCc0wkNUB5AA51EWkVLTHZQryBR2yRz4=","OiRdtC3awq+SR/AS18narMnR/DaEFsKnFNReNzuwB/M=","/Hm/Z96K/paPLiDm6Hg/UthwMF98L2duz2wQSOONaPY=","USDT3KdfRPWBPFEuxY1bNT+m07+fj2yWta9GrlJ7LCU=","Wm7+WWjE1Ne3WvR0Civt3sqot1kYYl80pmH4FLzVmr8=","jKoF/3l2XNcOoz4KQtaJ3J+xGkXHkILB1l+LvKDViCo=","mGKTmFNBDIv3V+aWDHbx2XDzAooWxqgC1AQgKg5z50w=","m44SHN2Bzh5NSeSOhT3yORe1K8GxHBopPgAhl3gP43w=","PKRy0eIJVsrIXIka/WEqaQ7vbZ6nHg5NrbO5agX078o=","OMZFNhv+jlajy83HV5NrmSXf7s+05Odkl5Hz0K4Il+8=","mEKlehQioM3400r2D1leEwejRKmm8BOZEVmNqrytK0w=","/usiIkmtP3kO09byAURmuQkuxjpwLGmrZNRUNa4HEms=","8Gxl0tHLFomSscZHx4aEuQXwgo8Xv8xI/NUcjvBJE3k=","fi3E7/R7IyKI8PA1eueZSjsQMVmGL50iFgHnajuhL1Q=","BgjXlNQRSV3FpI6jE5EhUguox4sWR3mYmXbRTJTrvmM=","Hytw4Y3Da6BnRDa6NVRwdLqz8cGEFYXbhx56N3Jl6Gc=","7HtVH2vjfifaWP5QVDtrJmGsU5y3AKVEM1byOmucJFE=","k+cjPLDOr3qJYyWKGSEDV3uDqCr6eXeTowYjOcVPjks=","dCwq0KlG31Fbdn1XTpMA7L1srCs90oyTnsDnKvqeJ7E=","PkegplA5mN27EaKSMpmlHgYJp1JEB1EPVjaKi5WCiLM=","LiSidIIiriUxLx2ENoysfq0yfT58n7ngdN/eJFAJKM8=","ykR9VyweTDLIWmGUl4VhokpGkbIlzFJYfD55S299wTY=","1Th4jwYFoT7Snk/jfQeeNvqcMIZ5hiq50+Q5i656WJo=","Kx65QeTaZfLDEyVzXU3+XBG14/g568EP0qWiyPLX9LY=","hHJT8AN2WkYRoT8yQaDAqrh9JHgKBedNj3Ub0doYR3I=","mITmq39Phxg+kanFR3hzVKM6nVwpk3zSaOAYvoBNq0U="],"block_size":4096,"path":"toc.js"}],"version":2}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"description":"treehash per file","signed_content":{"payload":"eyJjb250ZW50X2hhc2hlcyI6W3siYmxvY2tfc2l6ZSI6NDA5NiwiZGlnZXN0Ijoic2hhMjU2IiwiZmlsZXMiOlt7InBhdGgiOiJiYWNrZ3JvdW5kLmpzIiwicm9vdF9oYXNoIjoieXY5NV9RWTFNQ2FvajVtaUhpcnFYcnh0MHZ4eC1oUVpxR0ZjbHEwdGh1byJ9LHsicGF0aCI6Imljb24ucG5nIiwicm9vdF9oYXNoIjoibE1Gcl9kdlJFOE95VEtkX1JvbEVENXBqY2tEMmllWUpGZlZfWUhpNzNDNCJ9LHsicGF0aCI6Im1hbmlmZXN0Lmpzb24iLCJyb290X2hhc2giOiJFc0tiaDJwX3daYTQ5YmdXb2g0aEV1eU1CcnVDNWI3bGgwSG5LNDBWdU1VIn0seyJwYXRoIjoidG9jLmpzIiwicm9vdF9oYXNoIjoieHlNZjRTZ2pqLWNxaTNRenZYYlBvQ0ZnT21LTHdlTVVkSE93Y0luUlZuTSJ9XSwiZm9ybWF0IjoidHJlZWhhc2giLCJoYXNoX2Jsb2NrX3NpemUiOjQwOTZ9XSwiaXRlbV9pZCI6ImxpZmdlaWhjZnBrbW1sZmpiYWlsZnBmaGJhaGhpYmJhIiwiaXRlbV92ZXJzaW9uIjoiMC41LjkiLCJwcm90b2NvbF92ZXJzaW9uIjoxfQ","signatures":[{"header":{"kid":"publisher"},"protected":"eyJhbGciOiJSUzI1NiJ9","signature":"f_gZEXXrjM40q5n9avYTtpetFm3d_d_7ShC4ipZqsPbNlts_EjhepBmCyZCT8fWOjAhLbWJK8DL8p-7h_ntIwsT4pPYgj56GkkvGzfDmh-9OyqRNLLJSIm4D3X_t9DtjiIoiQp5iMA14-b_oBY1Zyb29UerCTGxQZDByt0OpMZRPxoH99AHIFmWyuEV2K2nDTV5N_a19XIUEk8LqpLvasy7FNlWYbdzdxspJhs_vtxJLM4pBjz2f4GwYMLyK8H_p2ITrmhaBcmN6DaqpEooysZ-dQvEE0uqlx4FBBrAqMqAvceyTDBKhhlwoHkW0kdfnVEsAsbxMfqLk3yaAA05NpA"},{"header":{"kid":"webstore"},"protected":"eyJhbGciOiJSUzI1NiJ9","signature":"HJQJzxrlFKcUyFK_xJFOJBlzVJ8GAO9Bp-R037VpoLBfMh9132JQnJUFcfSXXheDD2rginhrJ3xsEn7nrS0LkrWT0IWNw_scM4pQ4GmPRz3BfTl4uM0p0XTDQaj_ulz1Lh9d9NY5GdYeIBss-Hjo7miNApAuORMzlXIThuO9IFxJyi2YfTdhdLT9zIIBlaVrXR6f78vaujDx029anKQORHqgL6IIpbluUFvmogjvW-Fwjee6mbsBdsSL0iHdh2XvssJP9PFKZ79nZLki_4SJp_SPmd3LoEZTSLWcQJvfJ-NSulfGoUQ6kREXr3DrL-2h6SkXbQP4nPBoIOEngBYrQw"}]}}]
23 changes: 23 additions & 0 deletions backup/112-smart-toc/0.5.9_0/background.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
const getCurrentTab = (cb) => {
chrome.tabs.query({ active: true, currentWindow: true }, ([activeTab]) => {
cb(activeTab)
})
}

const execOnCurrentTab = (command) => {
getCurrentTab((tab) => {
if (tab) {
chrome.tabs.sendMessage(tab.id, command, (response) => {
if (command === 'toggle' && response === undefined) {
chrome.tabs.executeScript(tab.id, {
file: 'toc.js',
allFrames: true,
})
}
})
}
})
}

chrome.browserAction.onClicked.addListener(() => execOnCurrentTab('toggle'))
chrome.commands.onCommand.addListener((command) => execOnCurrentTab(command))
Binary file added backup/112-smart-toc/0.5.9_0/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 39 additions & 0 deletions backup/112-smart-toc/0.5.9_0/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"author": "[email protected]",
"background": {
"persistent": false,
"scripts": [ "background.js" ]
},
"browser_action": {
"default_icon": "icon.png",
"default_title": "Toggle table of contents"
},
"commands": {
"next": {
"description": "Jump to next heading"
},
"prev": {
"description": "Jump to previous heading"
},
"toggle": {
"description": "Show/hide TOC",
"suggested_key": {
"chromeos": "Ctrl+Shift+E",
"default": "Ctrl+Shift+E",
"linux": "Ctrl+Shift+E",
"mac": "Command+Shift+E"
}
}
},
"description": "Webpage outliner",
"icons": {
"128": "icon.png",
"16": "icon.png"
},
"key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtOPLDOZsa7DGxJO8Y/7asunjHpiWutCYhkKq8h9N7lLvaopMhkL8odxWo4gR0D4MPon8T+Pt1dFEXh7qT3KEuEnf6RWtqMdXkVaDZGVfxKJcWFIH0cTVEps93Z1tZtBeI6fltBxHs3r8HpmrgKIjk4f30kcQlQcMUfhhkj3qkgHv+noZ8iYhbXGUPRJ9Uqkyqr3kvSryfLPPU4+qoeVeXoeLVkgnkCj5asvIio92PvDxMguUS1MbW5uwBj3/llAlWVt4d6x6EoRbIOQS6MHj5gezUdeVi7O31RofbHGW2l8KbuRTj3GSJbfgkjImsMa1wiCbjL42lxnL3SJ35SisuQIDAQAB",
"manifest_version": 2,
"name": "Smart TOC",
"permissions": [ "activeTab" ],
"update_url": "https://clients2.google.com/service/update2/crx",
"version": "0.5.9"
}
Loading

0 comments on commit fd79366

Please sign in to comment.