-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
380 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,32 @@ | ||
# NotePadOnline | ||
|
||
## NPO是什么? | ||
NotePadOnline(以下简称为"NPO")不仅提供简洁的跨端笔记传输功能,也支持笔记设密、分享等实用功能。不仅如此,经过多代打磨,在安全性得到大幅提升的同时,便利性与实用性也在不断攀升。现在你已经可以在最新的版本中自由定义笔记的分享与否,还可以为笔记的分享设置密码。同时由于算法和逻辑的迭代更新,程序冗余度正不断减少。安全、便利与实用一直是NPO的初心,同时我们也深知没有设计就失去了灵魂。因此在3.0及以上版本中,NPO不仅很好地剥离了程序本体与主题,也支持主题切换。NPO默认主题的视觉效果也正不断更新迭代,在此NPO欢迎所有人创作属于自己的主题。 | ||
NotePadOnline(以下简称为"NPO")是一款类石墨文档的办公协同跨终端文档同步程序,支持文档设密、自定义分享开关、分享设密、导出为Word等功能。NPO是不依赖数据库的轻量程序,且在迭代更新中,兼具安全性和实用性。 | ||
|
||
## NPO的未来计划? | ||
### 1.NPO正逐步开放可供设定的权限与内容,目前处于更新计划中的有 | ||
[1]短网址支持 | ||
[2]注销所有笔记 | ||
[3]定时清理过时笔记缓存 | ||
[4]更多主题 | ||
注意:处于更新计划中并不意味着一定会得到更新,也可能会在未来砍掉;NPO没有后台,因此相关内容的设定仍需修改lib/config.php文件 | ||
### 2.NPO会更新一些实用功能,目前已被考虑的有 | ||
~~[1]分享页的二维码展示(完成)~~ | ||
[2]笔记分享的邀请码功能 | ||
~~[3]白昼与黑夜模式(完成)~~ | ||
~~[4]离线笔记(完成)~~ | ||
~~[5]笔记的内容清空(完成)~~ | ||
[6]删除笔记(连带缓存文件) | ||
~~[7]分享页设密(完成,且在3.0中进一步分离编辑页与分享页)~~ | ||
### 考虑过或者是被建议过的功能,但短期内甚至是长期也不一定会实现的有 | ||
[1]分享笔记的付费查看功能(理由:臃肿繁琐) | ||
[2]用户功能:包括查看访问过的笔记足迹、部分笔记设定用户归属、分发笔记可见或可改权限(理由:繁琐复杂、臃肿繁琐) | ||
[3]后台管理(理由:没有必要) | ||
[4]插件功能(理由:轻量为主、且愿意做插件的人局指可数) | ||
### 1.NPO正准备自"笔记同步"升级到"办公协同" | ||
版权、用户、企业等相关功能将在后续完善 | ||
### 2.NPO的更新计划中有 | ||
[1]办公协同相关 | ||
[2]短网址支持 | ||
[3]注销过期笔记 | ||
[4]更多主题样式 | ||
注意:处于更新计划中仍有可能会因各种原因在未来被砍掉 | ||
|
||
## 为什么有NPO? | ||
NPO原型是EverTools基金会的NotePad_Live。之所以延续NotePad_Live是因为作者喜爱并享受NotePad.live的便利,然而不久前宣称永不关闭的NotePad.live已经无法打开,于是便有了延续并重构NotePad_Live的想法与计划。 | ||
NPO最早的灵感是基于EverTools基金会的NotePad_Live。之所以延续NotePad_Live是因为作者喜爱并享受NotePad.live的便利,然而不久前宣称永不关闭的NotePad.live已经无法打开,于是便有了延续并重构NotePad_Live的想法与计划。 | ||
目前正打算升级到“办公协同”是受到石墨文档的启发 | ||
|
||
## 作者是谁? | ||
不得志的人生输家 | ||
欢迎关注我的个人博客(http://94joy.cn) | ||
|
||
## 演示(Demo)与下载(Download) | ||
演示:94NotePad公益 | ||
演示:NPO(http://n.94joy.cn) | ||
下载1:Github(https://github.com/2613df/NotepadOnline/releases) | ||
|
||
## 快拿银子来砸我吧! | ||
用爱发电是持不久的,作者没饭吃NPO项目也难以为继。因此NPO项目需要各位大大的帮助,如果您有能力赞助NPO项目,欢迎扫码拿钱来砸我!1元也可! | ||
![推荐使用微信赞助](https://github.com/2613df/NotepadOnline/raw/master/assets/image/wechatpay.png) | ||
非常感谢您了!!!!! | ||
如果您是学生且愿意支持这个项目的话,就请将这个项目或是n.94joy.cn这个网址推荐给身边的同学吧,如果能点个星星就更好了,万分感谢您的支持。 | ||
如果你对项目或是网站发展有建议的话,请在Github上发表您的想法,我会第一时间处理! | ||
如果你对项目或是网站发展有建议的话,请在Github上发表您的想法,我会第一时间处理! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,204 @@ | ||
/*jslint browser: true*/ | ||
/*jslint jquery: true*/ | ||
|
||
/* | ||
* jQuery Hotkeys Plugin | ||
* Copyright 2010, John Resig | ||
* Dual licensed under the MIT or GPL Version 2 licenses. | ||
* | ||
* Based upon the plugin by Tzury Bar Yochay: | ||
* https://github.com/tzuryby/jquery.hotkeys | ||
* | ||
* Original idea by: | ||
* Binny V A, http://www.openjs.com/scripts/events/keyboard_shortcuts/ | ||
*/ | ||
|
||
/* | ||
* One small change is: now keys are passed by object { keys: '...' } | ||
* Might be useful, when you want to pass some other data to your handler | ||
*/ | ||
|
||
(function(jQuery) { | ||
|
||
jQuery.hotkeys = { | ||
version: "0.2.0", | ||
|
||
specialKeys: { | ||
8: "backspace", | ||
9: "tab", | ||
10: "return", | ||
13: "return", | ||
16: "shift", | ||
17: "ctrl", | ||
18: "alt", | ||
19: "pause", | ||
20: "capslock", | ||
27: "esc", | ||
32: "space", | ||
33: "pageup", | ||
34: "pagedown", | ||
35: "end", | ||
36: "home", | ||
37: "left", | ||
38: "up", | ||
39: "right", | ||
40: "down", | ||
45: "insert", | ||
46: "del", | ||
59: ";", | ||
61: "=", | ||
96: "0", | ||
97: "1", | ||
98: "2", | ||
99: "3", | ||
100: "4", | ||
101: "5", | ||
102: "6", | ||
103: "7", | ||
104: "8", | ||
105: "9", | ||
106: "*", | ||
107: "+", | ||
109: "-", | ||
110: ".", | ||
111: "/", | ||
112: "f1", | ||
113: "f2", | ||
114: "f3", | ||
115: "f4", | ||
116: "f5", | ||
117: "f6", | ||
118: "f7", | ||
119: "f8", | ||
120: "f9", | ||
121: "f10", | ||
122: "f11", | ||
123: "f12", | ||
144: "numlock", | ||
145: "scroll", | ||
173: "-", | ||
186: ";", | ||
187: "=", | ||
188: ",", | ||
189: "-", | ||
190: ".", | ||
191: "/", | ||
192: "`", | ||
219: "[", | ||
220: "\\", | ||
221: "]", | ||
222: "'" | ||
}, | ||
|
||
shiftNums: { | ||
"`": "~", | ||
"1": "!", | ||
"2": "@", | ||
"3": "#", | ||
"4": "$", | ||
"5": "%", | ||
"6": "^", | ||
"7": "&", | ||
"8": "*", | ||
"9": "(", | ||
"0": ")", | ||
"-": "_", | ||
"=": "+", | ||
";": ": ", | ||
"'": "\"", | ||
",": "<", | ||
".": ">", | ||
"/": "?", | ||
"\\": "|" | ||
}, | ||
|
||
// excludes: button, checkbox, file, hidden, image, password, radio, reset, search, submit, url | ||
textAcceptingInputTypes: [ | ||
"text", "password", "number", "email", "url", "range", "date", "month", "week", "time", "datetime", | ||
"datetime-local", "search", "color", "tel"], | ||
|
||
// default input types not to bind to unless bound directly | ||
textInputTypes: /textarea|input|select/i, | ||
|
||
options: { | ||
filterInputAcceptingElements: true, | ||
filterTextInputs: true, | ||
filterContentEditable: true | ||
} | ||
}; | ||
|
||
function keyHandler(handleObj) { | ||
if (typeof handleObj.data === "string") { | ||
handleObj.data = { | ||
keys: handleObj.data | ||
}; | ||
} | ||
|
||
// Only care when a possible input has been specified | ||
if (!handleObj.data || !handleObj.data.keys || typeof handleObj.data.keys !== "string") { | ||
return; | ||
} | ||
|
||
var origHandler = handleObj.handler, | ||
keys = handleObj.data.keys.toLowerCase().split(" "); | ||
|
||
handleObj.handler = function(event) { | ||
// Don't fire in text-accepting inputs that we didn't directly bind to | ||
if (this !== event.target && | ||
(jQuery.hotkeys.options.filterInputAcceptingElements && | ||
jQuery.hotkeys.textInputTypes.test(event.target.nodeName) || | ||
(jQuery.hotkeys.options.filterContentEditable && jQuery(event.target).attr('contenteditable')) || | ||
(jQuery.hotkeys.options.filterTextInputs && | ||
jQuery.inArray(event.target.type, jQuery.hotkeys.textAcceptingInputTypes) > -1))) { | ||
return; | ||
} | ||
|
||
var special = event.type !== "keypress" && jQuery.hotkeys.specialKeys[event.which], | ||
character = String.fromCharCode(event.which).toLowerCase(), | ||
modif = "", | ||
possible = {}; | ||
|
||
jQuery.each(["alt", "ctrl", "shift"], function(index, specialKey) { | ||
|
||
if (event[specialKey + 'Key'] && special !== specialKey) { | ||
modif += specialKey + '+'; | ||
} | ||
}); | ||
|
||
// metaKey is triggered off ctrlKey erronously | ||
if (event.metaKey && !event.ctrlKey && special !== "meta") { | ||
modif += "meta+"; | ||
} | ||
|
||
if (event.metaKey && special !== "meta" && modif.indexOf("alt+ctrl+shift+") > -1) { | ||
modif = modif.replace("alt+ctrl+shift+", "hyper+"); | ||
} | ||
|
||
if (special) { | ||
possible[modif + special] = true; | ||
} | ||
else { | ||
possible[modif + character] = true; | ||
possible[modif + jQuery.hotkeys.shiftNums[character]] = true; | ||
|
||
// "$" can be triggered as "Shift+4" or "Shift+$" or just "$" | ||
if (modif === "shift+") { | ||
possible[jQuery.hotkeys.shiftNums[character]] = true; | ||
} | ||
} | ||
|
||
for (var i = 0, l = keys.length; i < l; i++) { | ||
if (possible[keys[i]]) { | ||
return origHandler.apply(this, arguments); | ||
} | ||
} | ||
}; | ||
} | ||
|
||
jQuery.each(["keydown", "keyup", "keypress"], function() { | ||
jQuery.event.special[this] = { | ||
add: keyHandler | ||
}; | ||
}); | ||
|
||
})(jQuery || this.jQuery || window.jQuery); |
Oops, something went wrong.