mirror of
https://github.com/Jonnyan404/memos-bber.git
synced 2026-04-25 03:58:37 +09:00
v3
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
## 说明
|
## 说明
|
||||||
|
|
||||||
一个通过浏览器插件发布 [memos](https://usememos.com/) 的插件。
|
一个通过浏览器插件发布 [Memos](https://usememos.com/) 的插件。
|
||||||
|
|
||||||
|
|
||||||
基于 iSpeak-bber 修改,原作者为 [DreamyTZK](https://www.antmoe.com/)。
|
基于 iSpeak-bber 修改,原作者为 [DreamyTZK](https://www.antmoe.com/)。
|
||||||
@@ -9,10 +9,6 @@
|
|||||||
},
|
},
|
||||||
"extName": {
|
"extName": {
|
||||||
"description": "扩展名称",
|
"description": "扩展名称",
|
||||||
"message": "Memos-lmm"
|
"message": "Memos-bber"
|
||||||
},
|
|
||||||
"selectionMenu": {
|
|
||||||
"description": "菜单(选中)",
|
|
||||||
"message": "发送选中内容"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,18 +0,0 @@
|
|||||||
chrome.contextMenus.create({
|
|
||||||
title: "记下 “%s”",
|
|
||||||
contexts: ['selection'],
|
|
||||||
onclick: function(info, tab){
|
|
||||||
//设定打开页面的一些初始值
|
|
||||||
console.log(info);
|
|
||||||
chrome.storage.sync.set({open_action: "save_text",open_content:info.selectionText}, function() {
|
|
||||||
chrome.windows.create({
|
|
||||||
url: chrome.extension.getURL("html/popup.html"),
|
|
||||||
left: 50,
|
|
||||||
top: 50,
|
|
||||||
width: 550,
|
|
||||||
height: 300,
|
|
||||||
type: "popup"
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
+4
-3
@@ -48,7 +48,7 @@ $('#tags').click(function () {
|
|||||||
tagDom += '<span class="item-container">#'+obj+'</span>'
|
tagDom += '<span class="item-container">#'+obj+'</span>'
|
||||||
});
|
});
|
||||||
//console.log(tagDom)
|
//console.log(tagDom)
|
||||||
$("#taglist").html(tagDom).slideToggle()
|
$("#taglist").html(tagDom).slideToggle(500)
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
$.message({
|
$.message({
|
||||||
@@ -62,15 +62,16 @@ $(document).on("click",".item-container",function () {
|
|||||||
var tagHtml = $(this).text()+" "
|
var tagHtml = $(this).text()+" "
|
||||||
add(tagHtml);
|
add(tagHtml);
|
||||||
})
|
})
|
||||||
|
|
||||||
$('#getlink').click(function () {
|
$('#getlink').click(function () {
|
||||||
chrome.tabs.getSelected(null, function (tab) {
|
chrome.tabs.query({ active: true, currentWindow: true }, ([tab]) => {
|
||||||
var linkHtml = " ["+tab.title+"]("+tab.url+") "
|
var linkHtml = " ["+tab.title+"]("+tab.url+") "
|
||||||
if(tab.url){
|
if(tab.url){
|
||||||
add(linkHtml);
|
add(linkHtml);
|
||||||
}else{
|
}else{
|
||||||
$.message({message: '获取失败 😂'})
|
$.message({message: '获取失败 😂'})
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
function add(str) {
|
function add(str) {
|
||||||
|
|||||||
+10
-13
@@ -1,10 +1,10 @@
|
|||||||
{
|
{
|
||||||
"background": {
|
"manifest_version": 3,
|
||||||
"scripts": [ "js/background.js" ]
|
"name": "__MSG_extName__",
|
||||||
},
|
"version": "2022.10.12",
|
||||||
"browser_action": {
|
"action": {
|
||||||
|
"default_popup": "popup.html",
|
||||||
"default_icon": "assets/logo_24x24.png",
|
"default_icon": "assets/logo_24x24.png",
|
||||||
"default_popup": "html/popup.html",
|
|
||||||
"default_title": "__MSG_actionTitle__"
|
"default_title": "__MSG_actionTitle__"
|
||||||
},
|
},
|
||||||
"default_locale": "zh_CN",
|
"default_locale": "zh_CN",
|
||||||
@@ -15,18 +15,15 @@
|
|||||||
"16": "assets/logo.png",
|
"16": "assets/logo.png",
|
||||||
"48": "assets/logo.png"
|
"48": "assets/logo.png"
|
||||||
},
|
},
|
||||||
"manifest_version": 2,
|
"permissions": ["tabs","storage","activeTab"],
|
||||||
"name": "__MSG_extName__",
|
"host_permissions": ["http://*/*", "https://*/*"],
|
||||||
"permissions": [ "storage", "webRequest", "contextMenus", "http://*/*", "https://*/*" ],
|
|
||||||
// 新增命令
|
|
||||||
"commands": {
|
"commands": {
|
||||||
"_execute_browser_action": {
|
"_execute_browser_action": {
|
||||||
"suggested_key": {
|
"suggested_key": {
|
||||||
"default": "Ctrl+Shift+D",
|
"default": "Ctrl+Shift+F",
|
||||||
"mac": "MacCtrl+Shift+D"
|
"mac": "MacCtrl+Shift+F"
|
||||||
},
|
},
|
||||||
"description": "Opens popup.html"
|
"description": "Opens popup.html"
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
"version": "2022.10.10"
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user