Compare commits

...

279 Commits
1.8 ... master

Author SHA1 Message Date
Alexey Skobkin 787d5b1c37 Release 1.42.1 2016-08-19 18:05:31 +03:00
Alexey Skobkin 58a38460f9 Booru images API base URL changed. 2016-08-19 18:03:17 +03:00
Alexey Skobkin 02c0594509 Release 1.42.0 2016-05-15 23:42:39 +03:00
Alexey Skobkin 552e65520d jQuery updated to version 3. 2016-05-15 23:40:56 +03:00
Alexey Skobkin af6cf59fdd Some scripts for building extension package. 2016-05-15 23:05:22 +03:00
Alexey Skobkin 7fcbc7c039 Release 1.41.1 2016-05-15 22:19:56 +03:00
Alexey Skobkin fe15a1633f update_right_panel_unread_count() bug fix. Now it counts comments on any tree level. 2016-05-15 22:19:46 +03:00
Alexey Skobkin 07b6a8d8bf Release 1.41.0 2016-05-15 16:31:23 +03:00
Alexey Skobkin afee3205dc Option "option_fancybox_smart_hints" removed. 2016-05-15 16:31:04 +03:00
Alexey Skobkin 0674268548 Some refactoring and optimizations. 2016-05-15 16:07:59 +03:00
Alexey Skobkin be749ff31f Release 1.40.4 2016-05-13 03:56:48 +03:00
Alexey Skobkin 207dff9e67 "Move /all button" fix and minor refactoring. 2016-05-13 03:56:34 +03:00
Alexey Skobkin b2fc048450 Release 1.40.3 2016-05-10 22:11:47 +03:00
Alexey Skobkin a771b26952 Updating comments count on WebSocket comment message. 2016-05-10 22:11:41 +03:00
Alexey Skobkin 2fc1134124 Release 1.40.2 2016-05-10 01:22:47 +03:00
Alexey Skobkin 6ee91fbb25 #78 fixed. Null recomendations comments fixed. WS close messages in console. 2016-05-10 01:22:43 +03:00
Alexey Skobkin 072ece28cd Do not "Go to new comment" button outside of the post page. 2016-05-10 00:49:46 +03:00
Alexey Skobkin e7a48b467f Release 1.40.1 2016-05-10 00:42:19 +03:00
Alexey Skobkin 0ba765e181 #95 fixed. 2016-05-10 00:42:16 +03:00
Alexey Skobkin 8f75c8d315 Release 1.40.0 2016-05-10 00:31:54 +03:00
Alexey Skobkin e67eb36443 Sidebar "go to unread comment" button bugfix. "Remove the fucking button" option added. 2016-05-10 00:31:50 +03:00
Alexey Skobkin ffef920411 Release 1.39.0 2016-05-09 04:56:56 +03:00
Alexey Skobkin 99760d2eb7 #97 done. Side panel with "Go to new comment" button. 2016-05-09 04:56:51 +03:00
Alexey Skobkin dc58ac8532 Release 1.38.0 2016-05-09 03:33:35 +03:00
Alexey Skobkin f91dfc4ba7 #96 and some other fixed. Now inserting new comments as HTML (new WebSocket message format). 2016-05-09 03:33:31 +03:00
Alexey Skobkin 75bc6636b2 Release 1.37.1 2016-05-09 03:18:30 +03:00
Alexey Skobkin eecd3133b8 #98 fixed. Adding new comments with 'unread' class. 2016-05-09 03:18:24 +03:00
Alexey Skobkin 06682d3222 Release 1.37.0 2016-05-09 02:52:49 +03:00
Alexey Skobkin 6c286150fa nbproject removed. 2016-05-09 02:47:08 +03:00
Alexey Skobkin 1df716d694 #102 done. Move /all page link to left menu. 2016-05-09 02:42:51 +03:00
Alexey Skobkin 7715c43ba1 Release 1.36.3 2015-07-19 22:55:26 +03:00
Alexey Skobkin 465c10137e Duplicate comments quick fix. 2015-07-19 22:47:09 +03:00
Alexey Skobkin a3a82d6087 nbproject removed. IDEA project added to .gitignore. 2015-07-19 22:22:29 +03:00
isqua b2d1bfdf4a Update grunt-bump version 2015-02-22 14:53:47 +03:00
Alexey Skobkin cc647700f0 Merged in remove_innerhtml (pull request #48) Remove unnecessary html inserting 2015-02-12 20:02:00 +03:00
isqua e865c41504 Remove unnecessary html inserting 2015-02-11 14:16:28 +03:00
Alexey Skobkin a64719424d Release 1.36.2 2015-02-10 22:22:06 +03:00
Alexey Skobkin 643919c62f Popup moved to the bottom. 2015-02-10 22:19:06 +03:00
Alexey Skobkin 11b1338841 Merged in iss87 (pull request #47) Улучшить аяксовые рекоммендации 2015-02-10 19:47:01 +03:00
isqua af70f93ec0 Показывать уведомление при успешной рекомендации без комментария; Fixes #86 2015-02-08 22:04:36 +03:00
isqua d45df7d629 Вставлять собственный комментарий-рекомендацию как комментарий-рекомендацию; Fixes #85 2015-02-08 22:04:12 +03:00
isqua 4e6d09a774 Поменять url для рекомендации комментария; Fixes #87 2015-02-08 22:03:52 +03:00
Alexey Skobkin 0bea1baa24 Release 1.36.1 2015-02-08 19:37:34 +03:00
Alexey Skobkin 2a0546fd65 Merged in iss84 (pull request #46) Не проверять файлы, если поля аттача нет; Fixes #84 2015-02-08 19:03:11 +03:00
isqua 0089798f86 Не проверять файлы, если поля аттача нет 2015-02-08 17:01:56 +03:00
Alexey Skobkin 2d98767bdd Merge branch 'master' of bitbucket.org:skobkin/chrome_point_plus 2015-02-08 13:44:15 +03:00
Alexey Skobkin 25fc9af6fa Release 1.36.0 2015-02-08 13:42:23 +03:00
Alexey Skobkin 4f7fc33cbd Fix fancybox missing images. Garbage deleted. 2015-02-08 13:39:39 +03:00
isqua 9d012c676f Replace Никита with NokitaKaze 2015-02-08 13:13:49 +03:00
isqua 7b4e3f250a Merged in iss83 (pull request #44)
Показывать добавленный комментарий; Fixes #83
2015-02-07 20:49:25 +03:00
isqua 35b1a2c309 Открывать пост и комментарий, если комментарий отправлен не со страницы поста 2015-02-07 20:27:19 +03:00
isqua 00846a56cc Скроллить к добавленному комментарию на странице поста 2015-02-07 20:27:19 +03:00
isqua 62e20aca51 Merged in options_top_elem_fix (pull request #45)
Поправить нецеликом нажимающийся верхний пункт
2015-02-07 20:26:30 +03:00
isqua a9a879b273 Поправить нецеликом нажимающийся верхний пункт 2015-02-07 20:25:51 +03:00
isqua 4615113a44 Merged in iss81 (pull request #43)
Отправлять форму не аяксом, если выбран файл; Fixes #81
2015-02-07 20:16:07 +03:00
isqua 5faabf04bd Отправлять форму не аяксом, если выбран файл 2015-02-07 19:38:11 +03:00
isqua ec6eb34e22 Не добавлять комментарий, если с сервера пришло {"error":"SomeError"} 2015-02-07 19:38:11 +03:00
isqua ad5ace57cb Merged in isqua/chrome_point_plus/iss82 (pull request #42)
Починить рекомендацию постов и комментариев при ajax-комментах; Fixes #82
2015-02-07 19:37:40 +03:00
isqua 94846f28f3 Починить рекомендацию постов и комментариев при ajax-комментах 2015-02-07 18:17:49 +03:00
isqua 13ee04dcc2 Merged in isqua/chrome_point_plus/ajax_comments (pull request #41)
Вынести ajax-комментарии, добавить биндинг на отправку формы
2015-02-07 00:21:04 +03:00
isqua a5accb5be3 Вынести ajax-комментарии, добавить биндинг на отправку формы 2015-02-05 22:48:13 +03:00
isqua 6b7df230b6 Merged in isqua/chrome_point_plus/iss80 (pull request #40)
AJAX comment sending indictaion; Fixes #80
2015-02-05 20:51:47 +03:00
isqua 639b72620b AJAX comment sending indictaion 2015-02-04 13:58:03 +03:00
isqua 74c0e0319f Merged in isqua/chrome_point_plus/code-style (pull request #14)
Code style checking
2015-02-04 13:56:19 +03:00
isqua 0a2b4c7538 Add info about build to README 2015-02-04 13:54:33 +03:00
isqua bd2aa28afc Fix codestyle in options.js 2015-02-03 19:07:22 +03:00
isqua 98982c6145 Fix codestyle in background.js 2015-02-03 19:07:22 +03:00
isqua 82b88b2146 Add jscs config 2015-02-03 19:07:22 +03:00
isqua 2af04fb767 Add jshint configs 2015-02-03 19:07:22 +03:00
isqua eb32411fa7 Add jshint and jscs 2015-02-03 19:07:22 +03:00
isqua 81ad370af1 Merged in isqua/chrome_point_plus/refactor_booru (pull request #39)
Refactor embedding from booru, tumblr etc.
2015-02-03 19:04:40 +03:00
isqua 358d44b3bd Add info about Nokita server to options 2015-02-02 14:47:58 +03:00
isqua 795298c94f Refactor embedding from booru, tumblr etc. 2015-02-02 14:47:57 +03:00
Alexey Skobkin f8e573a8b5 Merged in isqua/chrome_point_plus/combine_embedding_remove_link (pull request #38) Replace all “don’t remove original link” with single “remove original link” option 2015-01-31 15:30:13 +03:00
isqua fe6381ccfd Add chevron to video embedding option 2015-01-31 15:12:50 +03:00
isqua 18e75842f8 Remove video original link option 2015-01-31 15:12:50 +03:00
isqua a2f6aab453 Remove audio, soundclound and pleer.com original link option 2015-01-31 15:11:56 +03:00
isqua 82c2ef8442 Remove coub original link option 2015-01-31 15:11:56 +03:00
isqua fad1e5e689 Remove instagram original link option 2015-01-31 15:11:56 +03:00
isqua cb7cb397c1 Add single option `Remove original link` 2015-01-31 15:11:17 +03:00
Alexey Skobkin d35dc6036e Merged in isqua/chrome_point_plus/refactor_prostopleer (pull request #37) Refactor pleer.com and instagram embedding, remove bquery_ajax; Fixes #79 2015-01-31 14:49:09 +03:00
isqua 1f97b6d19c Remove bquery_ajax 2015-01-31 14:41:33 +03:00
isqua 0f9cb4e167 Refactor instagram embedding 2015-01-31 14:41:32 +03:00
isqua 08fa6c7bfa Remove pleercom_nokita_server option 2015-01-31 14:41:32 +03:00
isqua 21cab163d5 Refactor pleer.com embedding 2015-01-31 14:41:32 +03:00
Alexey Skobkin 068c461070 Merged in isqua/chrome_point_plus/iss74 (pull request #35) String option type; Fixes #74 2015-01-31 14:41:04 +03:00
isqua 54966185d1 Добавить текстовый тип опций 2015-01-31 11:54:54 +03:00
isqua fa02bd8f7b Переименовать объкет Options в OptionsPage во избежание путаницы 2015-01-31 11:54:54 +03:00
Alexey Skobkin 5f88797a93 Merged in isqua/chrome_point_plus/refactor_unique_comments (pull request #36) Remove bquery_ajax from unique comments counter 2015-01-31 08:34:33 +03:00
Alexey Skobkin 62673d3790 Merged in merge_pr25 (pull request #34) Instagram, drafts, some fixes. 2015-01-31 08:20:24 +03:00
Alexey Skobkin eb6b67f612 Some fixes. 2015-01-31 08:10:54 +03:00
isqua 13aa8595e7 Remove bquery_ajax from unique comments counter 2015-01-29 14:23:42 +03:00
Alexey Skobkin d818c7dc66 Fix bug #11. WebSocket recommendation comments. 2015-01-27 05:43:20 +03:00
Alexey Skobkin 6a951ea8d3 Fix bug #17. "@" on the subscribers and subscriptions page. 2015-01-27 04:36:02 +03:00
Alexey Skobkin f7d399c41a i18n for options page title. 2015-01-27 04:10:13 +03:00
Alexey Skobkin 3e6e3d5855 Space key fix from pull request #25. 2015-01-27 04:02:48 +03:00
Alexey Skobkin aa7b9649d1 Twitter fix. 2015-01-27 03:59:05 +03:00
Alexey Skobkin 684f6c15fe Post draft saving with option and some optimization. 2015-01-27 03:55:15 +03:00
Alexey Skobkin 429c432dc5 Встраивание Instagram из pull request #25. 2015-01-27 02:55:15 +03:00
Alexey Skobkin afa1ef0fb0 Merged in isqua/chrome_point_plus/oop_messages (pull request #28) Create objects for CSS and JS injections and for Message Handler 2015-01-27 00:30:57 +03:00
isqua 633410061a Add MessageSender module 2015-01-21 17:24:41 +03:00
isqua 49328a4b4a Refactor background.js 2015-01-21 17:24:41 +03:00
isqua 4a8d6f49f4 Move OptionsManager to separate file 2015-01-21 17:24:41 +03:00
Alexey Skobkin d90ebd48f3 Merge branch 'master' of bitbucket.org:skobkin/chrome_point_plus 2015-01-21 17:22:01 +03:00
isqua 552b997ba3 Merged in isqua/chrome_point_plus/nested_level_img_fix (pull request #33)
Исправить покусанные кружки
2015-01-21 17:10:32 +03:00
isqua b7768ca8a9 Заменить PNG-точечки на SVG 2015-01-20 15:14:32 +03:00
isqua 26893fbb4f Исправить обрезанные кружки при резиновой вёрстке 2015-01-20 15:12:26 +03:00
Alexey Skobkin 0eca347c7d Release 1.35.1 2015-01-20 12:19:41 +04:00
Alexey Skobkin 9bf72cbeb0 Release 1.35.0 2015-01-20 12:02:07 +04:00
Alexey Skobkin 5d3e09d99c Fadeout fix. 2015-01-20 11:51:46 +04:00
Alexey Skobkin 2fb3dca119 Merged in feature_ajax_comments (pull request #32) Отправка комментариев через AJAX 2015-01-20 10:49:00 +03:00
Alexey Skobkin 454976daa7 Garbage removed. 2015-01-20 11:33:14 +04:00
Alexey Skobkin e30b440956 Merge branch 'master' into feature_ajax_comments 2015-01-20 10:23:59 +03:00
Alexey Skobkin 60d5a7351e Merged in isqua/chrome_point_plus/nesting_level_indicator (pull request #31)
Не добавлять лишний элемент для отрисовки точечек и не портить марджины
2015-01-20 10:13:23 +03:00
isqua 46c430a3d8 Не добавлять лишний элемент для отрисовки точечек и не портить марджины 2015-01-19 23:01:02 +03:00
Alexey Skobkin 612052e5ca Posts notification option check fix. 2015-01-16 15:48:57 +04:00
Alexey Skobkin 4203ba62ed First! 2015-01-15 18:37:28 +04:00
Alexey Skobkin 2a5e9da2d8 New options for WebSocket post processing. 2015-01-15 15:19:12 +04:00
Alexey Skobkin 6d6a9fa3d6 Option for AJAX comments. A bit of JSDoc. 2015-01-15 13:45:07 +04:00
Alexey Skobkin 56bd3117ec Error messages. 2015-01-15 13:05:37 +04:00
Alexey Skobkin c5ba450afe Ajax comments test implementation. Some bugs included. 2015-01-14 18:41:34 +04:00
Alexey Skobkin dcb1dcf529 Notification click bugfix. 2015-01-14 15:42:20 +04:00
Alexey Skobkin 26b5da4e93 Fixes. 2015-01-14 14:59:51 +04:00
Alexey Skobkin fadfc43aa1 Comment DOM generation moved to separate function. Some bugs fixed. Some optimizations done. 2015-01-14 13:34:04 +04:00
Alexey Skobkin b49ecaf937 Locale fixes. 2015-01-14 09:30:40 +04:00
Alexey Skobkin 01387be169 Merge branch 'master' of bitbucket.org:skobkin/chrome_point_plus 2015-01-14 08:16:06 +03:00
Alexey Skobkin c4e6683c80 nbproject 2015-01-14 08:15:52 +03:00
isqua 1a190e04e8 Fix “enlarge font” settings 2015-01-14 08:01:45 +03:00
isqua bf9e8940ed Fixes #58; grunt-bump breaks manifest_version in manifest.json 2015-01-14 08:01:45 +03:00
Alexey Skobkin 62e357dad6 jquery idTabs dropped. 2015-01-14 08:52:04 +04:00
Alexey Skobkin 1b5cd3ce97 Merged in isqua/chrome_point_plus/iss61 (pull request #29) Fixes #61; Fix “enlarge font” settings 2015-01-11 16:53:14 +03:00
isqua 338fd8682a Fix “enlarge font” settings 2015-01-11 14:17:59 +03:00
Alexey Skobkin f12cdc0b9f Merged in isqua/chrome_point_plus/grut-bump_fork (pull request #26) Fixes #58; grunt-bump breaks manifest_version in manifest.json 2015-01-08 23:08:29 +03:00
Alexey Skobkin ffc6ce084b Merged in isqua/chrome_point_plus/editorconfig (pull request #27) Add editorconfig and replace all CRLF with LF 2015-01-08 22:28:13 +03:00
isqua aabd83881a Replace CLRF with LF and add new line to the end of files 2015-01-08 17:41:12 +03:00
isqua 08a94616cc Add editorconfig 2015-01-08 16:19:25 +03:00
isqua 23dcf17f3f Fixes #58; grunt-bump breaks manifest_version in manifest.json 2015-01-08 15:34:32 +03:00
Alexey Skobkin bb5f9f87f0 Release 1.30.0. 2015-01-08 00:40:50 +04:00
Alexey Skobkin 8fccbe9137 Release 1.30.0 2015-01-07 22:54:11 +03:00
Alexey Skobkin 1820146431 getVersion() removed. options.js now not including to the page. Manifect fix. New version detect implementation in background.js. 2015-01-07 23:11:10 +04:00
Alexey Skobkin fa5c12539e One more l10n fix. 2015-01-07 21:56:12 +04:00
Alexey Skobkin 438e7b15fa l10n fix. More deprecated functions. 2015-01-07 21:53:50 +04:00
Alexey Skobkin 3499dd317a README fix. 2015-01-07 21:40:05 +04:00
Alexey Skobkin 96a640d57f New options fix. 2015-01-07 21:37:08 +04:00
Alexey Skobkin 7db44c4715 Merged in isqua/chrome_point_plus/simplify_options (pull request #23) Enhance options 2015-01-07 20:08:38 +03:00
Alexey Skobkin e894e2756b Merged in fix_injection (pull request #24) Dynamic JS/CSS loading and some external lib fixes. 2015-01-07 19:47:17 +03:00
Alexey Skobkin 3c66c1fbb5 Drop prefixes. 2015-01-07 20:17:37 +04:00
Alexey Skobkin e8bbd4dc36 Corrections. 2015-01-07 20:10:29 +04:00
Alexey Skobkin c0e18f8807 Small fixes. 2015-01-07 09:51:51 +04:00
Alexey Skobkin 8f9d880cb2 Bower's Fancybox CSS fix. 2015-01-07 09:11:05 +04:00
Alexey Skobkin 27e97f138b Bower's MarkItUp CSS fix. 2015-01-07 08:57:23 +04:00
Alexey Skobkin 0dae3f8661 Moar fixes. 2015-01-07 08:43:17 +04:00
Alexey Skobkin 93a24c57d4 Fuck You, Chrome API documentation!!11 2015-01-07 08:19:02 +04:00
Alexey Skobkin 180d58b464 Non-working dynamic loading system and new message API. 2015-01-07 06:36:06 +04:00
isqua 769d1bb71a Enhance options 2015-01-07 01:14:14 +03:00
Alexey Skobkin cb2ca9766b Moar Fancybox fix. 2015-01-06 17:25:05 +04:00
Alexey Skobkin a8f430deb4 Bower's Fancybox fix for extension. 2015-01-06 01:48:03 +04:00
Alexey Skobkin 0f87a60f64 Merge branch 'master' of bitbucket.org:skobkin/chrome_point_plus 2015-01-06 00:33:04 +03:00
Alexey Skobkin 3a059fe899 Merged in isqua/chrome_point_plus/options_fix (pull request #21) Fix first installation error 2015-01-06 00:32:33 +03:00
isqua 1057506f05 Fix first installation error 2015-01-06 00:19:37 +03:00
Alexey Skobkin 21eb253031 Merged in isqua/chrome_point_plus/soudcloud_bower (pull request #22) Move Soundcloud to Bower 2015-01-06 00:10:32 +03:00
Alexey Skobkin f32dfa9cce Netbeans config garbage. 2015-01-06 00:50:27 +04:00
Alexey Skobkin 194b7c63fc grunt-bump config changes. 2015-01-06 00:48:03 +04:00
Alexey Skobkin a62d45c8c1 Dynamic injection of JS and CSS. 2015-01-06 00:47:41 +04:00
isqua d02b78d25d Move Soundcloud to Bower 2015-01-05 23:39:12 +03:00
skobkin 3447244261 New update message. 2015-01-05 23:28:19 +04:00
Alexey Skobkin 9c365446eb Merged in isqua/chrome_point_plus/refactor_options (pull request #19) Refactor options.js 2015-01-05 22:18:31 +03:00
isqua 1ced5d9c49 Fixes #51; Не сбрасывать настройки при обновлении 2015-01-05 20:05:15 +03:00
Sofya Ilinova 4bf58b0927 Refactor options.js 2015-01-05 19:55:22 +03:00
Alexey Skobkin b750f50f3c Merged in NokitaKaze/chrome_point_plus-nokita-version (pull request #16)
5 фич (nesting, хинт фансибокса, система комментариев, обновление кол-ва комментариев и постов, встраивание твитов), 3 исправленных бага
2015-01-05 19:47:04 +03:00
Nokita Kaze 4165bb0d97 Встраивание твитов: Цвет забыл убрать на дефолтный. Вставил русский язык по умолчанию 2015-01-05 19:34:53 +03:00
Nokita Kaze 5e88304b72 Подавитесь 2015-01-05 19:21:30 +03:00
Nokita Kaze 95f8dab7f5 Merge branch 'developer' 2015-01-05 19:17:31 +03:00
Nokita Kaze 993a446a5c + Твиты из твиттера 2015-01-05 19:17:00 +03:00
Alexey Skobkin 9b42e4b982 Merged in isqua/chrome_point_plus/bump_task (pull request #20)
Add bump task
2015-01-05 17:30:20 +03:00
Никита Ветров 3f820c5b39 .bowerrc edited online with Bitbucket 2015-01-05 13:47:28 +00:00
isqua ce79f820ba Add bump task 2015-01-05 16:31:13 +03:00
Nokita Kaze 98367c52c0 Merge branch 'formerge2' of bitbucket.org:NokitaKaze/chrome_point_plus-nokita-version
Conflicts:
	chrome_point_plus/css/point-plus.css
2015-01-04 23:20:05 +03:00
Никита Ветров b26eeea548 Merged skobkin/chrome_point_plus/master into formerge2 2015-01-04 23:13:13 +03:00
Alexey Skobkin ead197bf78 Merged in isqua/chrome_point_plus/extract_options_css (pull request #18)
Move options style to separate file
2015-01-04 20:57:02 +03:00
Nokita Kaze e3a2a71b2a * Косяк с цветами баджей исправлен 2015-01-03 03:07:04 +03:00
Nokita Kaze e6d8c31d7a * Если окно активное, мы не меняем заголовок 2015-01-03 00:32:17 +03:00
Nokita Kaze d166ece3dd + Обновление кол-ва комментариев/сообщений в заголовке 2015-01-02 22:10:02 +03:00
Sofya Ilinova 311bbc55e1 Move options style to separate file 2015-01-02 21:10:31 +03:00
Nokita Kaze 8287bf4da1 * Папка по умолчанию не vendor, блядь. Вы куда, блядь, смотрите вообще?
* Убрал строки с версиями из bower.json и package.json, на хуй они там не нужны. Только проблемы с версионностью в manifest.json будут вызывать
2015-01-02 20:02:12 +03:00
Nokita Kaze 4df5409ba2 Мдя 2015-01-02 19:43:09 +03:00
Nokita Kaze 865f489dc0 Merge branch 'developer' 2015-01-02 19:06:10 +03:00
Никита Ветров 442cb4ad15 Merged skobkin/chrome_point_plus into master 2015-01-02 19:03:40 +03:00
Nokita Kaze 026130913c Пробелы 2015-01-02 19:02:57 +03:00
Nokita Kaze 6c054b8dba * Смарт хинт стал ещё умнее! 2015-01-02 18:53:46 +03:00
Alexey Skobkin 4a98f8d317 Merged isqua (pull request #17) - Унести все библиотеки в Bower 2015-01-02 16:41:47 +03:00
Sofya Ilinova 26b5ac3fe8 Add Grunt 2014-12-31 23:47:02 +03:00
Sofya Ilinova 7e324cd3bf Add markItUp to Bower 2014-12-30 19:36:02 +03:00
Sofya Ilinova 0b33ae6322 Add FancyBox to Bower 2014-12-30 19:36:02 +03:00
Sofya Ilinova c732ad74d0 Add jQuery to Bower 2014-12-30 19:36:01 +03:00
Nokita Kaze 17b7274665 У меня сейчас ощущение как у главного героя первой серии первого сезона Black Mirror после того как он сделал то, что его заставили сделать 2014-12-30 17:57:43 +03:00
Nokita Kaze 96dbb19ea4 * Шваброточку поменял
* Стиль function() поправил
* User comments system вынес в опционалку, хотя считаю, что непоражающий функионал можно не отключать
* same protocol через //
2014-12-30 16:59:26 +03:00
Nokita Kaze 0599990e2d Same Origin problem 2014-12-29 10:50:59 +03:00
Nokita Kaze c56e31c14c + Обновление количества непрочитанных постов и комментариев в левом меню 2014-12-29 10:27:24 +03:00
Nokita Kaze 0aa4e8c886 * Не ставился хинт у пользователей с большими буквами в нике 2014-12-27 20:34:58 +03:00
Nokita Kaze c46b58fb0e + Nesting-level https://bitbucket.org/skobkin/chrome_point_plus/issue/16/nesting-level-indicator 2014-12-26 13:14:21 +03:00
Nokita Kaze b41b20e5eb * https://bitbucket.org/skobkin/chrome_point_plus/issue/36/-------------- Черновик сохраняется через keyup, а не по крону
* Исправлена ошибка в заметках, у ссылки может не быть href'а
2014-12-26 12:14:29 +03:00
Nokita Kaze 6110aa6785 + Система пользовательских комментариев к другим пользователям https://bitbucket.org/skobkin/chrome_point_plus/issue/50/--------------------------- 2014-12-26 12:01:58 +03:00
Nokita Kaze 8d368ab4a6 * Убрал дублирование кода
* Сделал 2px паддинг слева для постов, потому что когда включена опция "mark unread posts", аватар налазит на бордюр и становится НЕКРАСИВО
2014-12-26 10:05:29 +03:00
Nokita Kaze 6777d8b241 https://bitbucket.org/skobkin/chrome_point_plus/issue/47/fancybox сделан 2014-12-26 09:45:36 +03:00
Nokita Kaze fbe0b698c2 Исправлен мажорный баг, когда черновик сообщения затирался старым сообщением, если Point+ грузился слишком долго
https://bitbucket.org/skobkin/chrome_point_plus/issue/36/--------------
2014-12-26 09:15:14 +03:00
Никита Ветров 0d4051855b Merged skobkin/chrome_point_plus into master 2014-12-26 08:39:32 +03:00
Sofya Ilinova 0ea6b24e88 Add bower 2014-11-27 16:48:39 +03:00
Sofya Ilinova 18299ea0a6 Add package.json 2014-11-27 16:48:39 +03:00
Alexey Skobkin f931fedd29 Some text corrections. 2014-11-27 16:11:20 +04:00
Никита Ветров 9c96fc54db Merged skobkin/chrome_point_plus into master 2014-11-27 00:56:05 +03:00
Alexey Skobkin 48f49af2a4 Merged in NokitaKaze/chrome_point_plus-nokita-version (pull request #13)
Четыре изменения, включая audio, coub и неделю Тойоты
2014-11-27 00:44:10 +03:00
Alexey Skobkin 882f6627a8 Some refucktoring and fixes. 2014-11-27 01:39:45 +04:00
Nokita Kaze 2a8ac706c9 На битбакете объявили неделю Тойоты: количество переменных в глобал скоупе сократилось на одну 2014-11-26 23:52:47 +03:00
Nokita Kaze 4b13936dfa + Парсер coub.com 2014-11-26 23:49:53 +03:00
Nokita Kaze 817ef68473 * Так, вот теперь работает 2014-11-26 23:49:38 +03:00
Nokita Kaze 572f137b5d * Парсер аудио-ссылок 2014-11-26 23:49:16 +03:00
Nokita Kaze d14e69c7b5 * * Выбор парсинга ссылок на видео через радио-батон - Оп-па, сишкостайл. Меня подзаебало, что на странице chrome://extensions/ какое-то говно в опциях + Переменная current_options, в которой содержится текущее (на момент загрузки) содержимое опций. Нечего дуплиться в асинхронное обращение к опциям * Поправил селекторы. Я такой наркоман был что ли? 2014-11-26 23:48:08 +03:00
Nokita Kaze 3aad05956e * Парочка изменений с обработкой видео-галок 2014-11-26 23:36:12 +03:00
Никита Ветров 6d8368be93 Merged skobkin/chrome_point_plus into master 2014-11-26 23:33:13 +03:00
Alexey Skobkin b4a039843d Some refucktoring. 2014-11-27 00:24:34 +04:00
Alexey Skobkin fbec7b4a2d i18n fix for fix for fix. 2014-11-26 23:10:54 +04:00
Alexey Skobkin b607c04045 Fix fix. 2014-11-26 23:07:12 +04:00
Alexey Skobkin 699fd726c4 Showing icon as soon as possible. 2014-11-26 23:00:32 +04:00
Alexey Skobkin 5293443c86 Options fix. 2014-11-26 23:00:17 +04:00
Никита Ветров 11511d9fdf Merged skobkin/chrome_point_plus into master 2014-11-25 13:43:07 +03:00
Alexey Skobkin ceb01f9d8d Quick failure fix. Needs to be optimized. 2014-11-24 21:41:04 +04:00
Никита Ветров 5590f32163 Merged skobkin/chrome_point_plus into master 2014-11-24 18:29:15 +03:00
Alexey Skobkin 082e7dbdb2 License file moved to the root of repository and slightly updated. 2014-11-24 19:12:10 +04:00
Alexey Skobkin a742438da7 Merge branch 'master' of bitbucket.org:skobkin/chrome_point_plus
Conflicts:
	chrome_point_plus/manifest.json
2014-11-24 19:00:15 +04:00
Alexey Skobkin 8f5a6d7185 Clickable notifications (#38) 2014-11-24 18:57:34 +04:00
Alexey Skobkin b28d228513 Merged in NokitaKaze/chrome_point_plus-nokita-version (pull request #10)
Плашка / Автосохранение черновика
2014-11-24 17:02:40 +03:00
Nokita Kaze 1b34833f7c БЕСТ СЕКУРЕТЕ ПРАКТЕС 2014-11-24 16:40:59 +03:00
Nokita Kaze 3d9e54b62d * Исправил debug-плашку для Point+
+ Добавил автосохранение черновиков
2014-11-24 16:20:19 +03:00
Никита Ветров 79fad70964 Merged skobkin/chrome_point_plus into master 2014-11-24 15:34:38 +03:00
Alexey Skobkin d749c1e2c5 Piece of shit hidden. 2014-11-24 01:26:14 +04:00
Alexey Skobkin 34cc000ef8 - Dynamic options save/load
- Warning for @NokitaKaze
- Some shit-like codestyle corrections
2014-11-24 01:02:23 +04:00
Alexey Skobkin 282314d9d6 Shit-like code style mostly dropped out. 2014-11-23 13:10:35 +04:00
Alexey Skobkin dcf7346078 Merged in NokitaKaze/chrome_point_plus-nokita-version (pull request #9)
Шесть изменений
2014-11-23 11:51:36 +03:00
Nokita Kaze 7b7836b2b2 * Откуда она тут появилась? 2014-11-22 15:18:07 +03:00
Nokita Kaze ae7b78ac16 Merge branch 'Branch_ff51da8c3a3e21a38a8250fc2acd72c17ba6e744' 2014-11-22 15:15:43 +03:00
Nokita Kaze 7bbbf90582 * Скобкинозамечания
+ Проверка, что Point+ загружается не единожды
+ Говнистый кейс заблюривания постов полностью
2014-11-22 15:15:22 +03:00
Nokita Kaze 0ca4d58805 * Сиськи тоже скрываем
* best-practice data-type для фансибокса вместо rel
* best-practice data-type для фансибокса вместо title
+ Нормальный хинт для фансибокса вместо старого невнятного дерьма
+ Скрываем из галерии изображения, которые протеганы как nsfw/сиськи
2014-11-21 19:56:28 +03:00
Nokita Kaze 16b86255ec * Другой блюр, теперь нормальный. Блюрить текст — максимум пидорство
+ По ховеру на заблюреным изображением — появляется нормальное изображение
+ Скроллинг между постов по пробелу
+ Превращаем в video все ссылки на видео и молимся
* ФОРМАТИРУЕМ КОД, БЛЕАТЬ
2014-11-21 18:49:12 +03:00
Никита Ветров ff51da8c3a Merged skobkin/chrome_point_plus into master 2014-11-21 17:10:15 +03:00
Alexey Skobkin bedb73e754 - NSFW content filtration (#32)
- Options auto save without closing (#29)
2014-11-20 20:47:47 +04:00
Alexey Skobkin 33db041b92 - Basic localization for Russian and English
- Some small fixes
- Version update
2014-11-17 03:27:39 +04:00
Никита Ветров f47e2b52fd Merged skobkin/chrome_point_plus into master 2014-11-17 01:05:40 +03:00
Alexey Skobkin 3243242583 - Fix soundcloud protocol
- Permissions fix
- Text fix
- Version update
2014-11-16 22:32:47 +04:00
Никита Ветров 0125014935 Merged skobkin/chrome_point_plus into master 2014-11-16 21:16:57 +03:00
Alexey Skobkin 320869316e Merged in NokitaKaze/chrome_point_plus-nokita-version (pull request #6)
Pleer.com
2014-11-16 21:16:28 +03:00
Nokita Kaze d308786127 * Подавитесь своим Json'ом, Аяксом и кросс-сайтом 2014-11-16 16:26:05 +03:00
Nokita Kaze efd276deec К сожалению это невозможно. Браузер не даёт сделать Cross-site запрос.
No 'Access-Control-Allow-Origin' header is present on the requested resource
2014-11-16 15:10:11 +03:00
Nokita Kaze 78defcc344 Merge branch 'master' into HEAD 2014-11-16 13:58:20 +03:00
Nokita Kaze 7970c15c92 Merge commit 'e3f5358ad0c053d2ada21228bc9b6f8cb849f1f0' 2014-11-16 13:51:11 +03:00
Nokita Kaze e3f5358ad0 + Pleer.com via server-side
* param is selfclosed tag
2014-11-16 13:27:54 +03:00
Никита Ветров 185339769f Merged skobkin/chrome_point_plus/master into Formerge 2014-11-16 13:12:53 +03:00
Alexey Skobkin 322e8a6edd Soundcloud fix. 2014-11-16 10:42:11 +04:00
Alexey Skobkin 898a9ecb21 3rd party (@NokitaKaze) server notification. 2014-11-16 06:38:34 +04:00
Alexey Skobkin aef434a8a8 Nested menu indicator symbol. 2014-11-16 06:29:20 +04:00
Alexey Skobkin 93362d112a SoundCloud embedding. New JS injecting method. 2014-11-16 06:01:31 +04:00
Nokita Kaze 80d0686cbf * Без прелоада 2014-11-16 03:48:51 +03:00
Nokita Kaze 23a6897289 + Pleer.com embeding 2014-11-16 02:55:13 +03:00
Никита Ветров 3a756b7452 Merged skobkin/chrome_point_plus into master 2014-11-16 01:29:45 +03:00
Alexey Skobkin d07a560233 Merged in NokitaKaze/chrome_point_plus-nokita-version (pull request #2)
1.9.2
2014-11-15 17:27:49 +03:00
Nokita Kaze 3c399fab5e * Исправлен баг с FancyBox, нужно было форсированно проставить type:images, потому что медиахелпер не кушал ссылку, а по умолчанию null
+ Добавлена возможность объединить все картинки из Фансибокса в один поток для удобного скроллинга
2014-11-15 13:08:53 +03:00
Никита Ветров 5519280c3d Merged skobkin/chrome_point_plus into master 2014-11-15 12:20:33 +03:00
Alexey Skobkin bc29a53984 - Dynamic options loading on the options page
- Fixed fluid layout option
2014-11-15 07:59:56 +04:00
Alexey Skobkin dbd857b9a7 Continue to refactor options. 2014-11-15 07:14:58 +04:00
Alexey Skobkin 6951f07bdd Small options refactoring. Gelbooru and WEBM moved to the embedding section. 2014-11-15 06:44:36 +04:00
Alexey Skobkin 7a23b3a518 Text fix. 2014-11-15 06:24:27 +04:00
Alexey Skobkin 599ccc551c Fixed fancybox for #posts (comments excluded) 2014-11-15 05:49:53 +04:00
Alexey Skobkin 8d1222766c README!!!11 2014-11-15 05:17:28 +04:00
Alexey Skobkin b57492bb5f CTRL+Enter binding flagged as deprecated and disabled for now 2014-11-15 04:58:30 +04:00
Alexey Skobkin 06f03697b9 Novacoin GTFO 2014-11-15 04:53:12 +04:00
Alexey Skobkin a620fb954c - Notifications enabled in Opera
- Fixed version number
- @NokitaKaze added to authors list
2014-11-15 04:49:51 +04:00
Никита Ветров 7a73404f98 Merged skobkin/chrome_point_plus into master 2014-11-15 03:30:17 +03:00
Alexey Skobkin ab4abe7337 Merged in NokitaKaze/chrome_point_plus (pull request #1)
Первые четыре фичи из point_extension_booru
2014-11-15 03:25:37 +03:00
Nokita Kaze bbbb97ca5f + Добавил в CSS новые классы + Добавил новые опции * Поправил ошибку с null.addEventListener + Добавил свою библиотеку для Ajax'а + Сам код 2014-11-15 03:11:00 +03:00
49 changed files with 4119 additions and 2261 deletions

3
.bowerrc Normal file
View File

@ -0,0 +1,3 @@
{
"directory": "vendor"
}

12
.editorconfig Normal file
View File

@ -0,0 +1,12 @@
root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
[{package.json,bower.json}]
indent_size = 2

7
.gitignore vendored
View File

@ -1,2 +1,7 @@
/nbproject/private/
chrome_point_plus/vendor/
/nbproject/
node_modules/
npm-debug.log
publish
vendor/
/.idea/

119
.jscs.json Normal file
View File

@ -0,0 +1,119 @@
{
"disallowImplicitTypeConversion": [ "numeric", "boolean", "binary" ],
"disallowKeywordsOnNewLine": [ "else" ],
"disallowMixedSpacesAndTabs": true,
"disallowMultipleLineBreaks": true,
"disallowMultipleLineStrings": true,
"disallowNewlineBeforeBlockStatements": true,
"disallowOperatorBeforeLineBreak": [ "+", "-", "*", "/", "." ],
"disallowPaddingNewlinesInBlocks": true,
"disallowQuotedKeysInObjects": "allButReserved",
"disallowSpaceAfterObjectKeys": true,
"disallowSpaceAfterPrefixUnaryOperators": [ "++", "--", "+", "-" ],
"disallowSpaceBeforePostfixUnaryOperators": true,
"disallowSpacesInCallExpression": true,
"disallowSpacesInFunctionExpression": {
"beforeOpeningRoundBrace": true
},
"disallowSpacesInNamedFunctionExpression": {
"beforeOpeningRoundBrace": true
},
"disallowSpacesInsideParentheses": true,
"disallowTrailingComma": true,
"disallowTrailingWhitespace": true,
"disallowYodaConditions": true,
"requireBlocksOnNewline": true,
"requireCapitalizedConstructors": true,
"requireCommaBeforeLineBreak": true,
"requireCurlyBraces": [
"if",
"else",
"for",
"while",
"do",
"try",
"catch"
],
"requireDotNotation": true,
"requireLineBreakAfterVariableAssignment": true,
"requireLineFeedAtFileEnd": true,
"requirePaddingNewlinesBeforeKeywords": [
"do",
"for",
"if",
"switch",
"try",
"void",
"while",
"with",
"return"
],
"requireSpaceAfterBinaryOperators": true,
"requireSpaceAfterKeywords": [
"do",
"for",
"if",
"else",
"switch",
"case",
"try",
"catch",
"void",
"while",
"with",
"return",
"typeof"
],
"requireSpaceAfterLineComment": {
"allExcept": [ "#", "=" ]
},
"requireSpaceAfterPrefixUnaryOperators": [ "~", "!" ],
"requireSpaceBeforeBinaryOperators": [
"=",
"+",
"-",
"/",
"*",
"==",
"===",
"!=",
"!=="
],
"requireSpaceBeforeBlockStatements": true,
"requireSpaceBeforeKeywords": [
"else",
"while",
"catch"
],
"requireSpaceBeforeObjectValues": true,
"requireSpaceBetweenArguments": true,
"requireSpacesInAnonymousFunctionExpression": {
"beforeOpeningCurlyBrace": true
},
"requireSpacesInForStatement": true,
"requireSpacesInFunctionDeclaration": {
"beforeOpeningCurlyBrace": true
},
"requireSpacesInFunctionExpression": {
"beforeOpeningCurlyBrace": true
},
"requireSpacesInNamedFunctionExpression": {
"beforeOpeningCurlyBrace": true
},
"requireSpacesInsideObjectBrackets": "allButNested",
"validateIndentation": 4,
"validateLineBreaks": "LF",
"validateParameterSeparator": ", ",
"excludeFiles": [
"chrome_point_plus/js/bquery_ajax.js",
"chrome_point_plus/js/markitup/sets/markdown/set.js",
"chrome_point_plus/js/point-plus.js",
"chrome_point_plus/vendor/**",
"nbproject/**",
"node_modules/**",
"publish/**",
"vendor/**"
]
}

9
.jshintignore Normal file
View File

@ -0,0 +1,9 @@
.git/**
chrome_point_plus/js/bquery_ajax.js
chrome_point_plus/js/markitup/sets/markdown/set.js
chrome_point_plus/js/point-plus.js
chrome_point_plus/vendor/**
nbproject/**
node_modules/**
publish/**
vendor/**

26
.jshintrc Normal file
View File

@ -0,0 +1,26 @@
{
"bitwise": true,
"camelcase": false,
"curly": true,
"eqeqeq": true,
"es3": false,
"forin": true,
"freeze": true,
"latedef": true,
"maxlen": 120,
"maxparams": 4,
"newcap": true,
"noarg": true,
"noempty": true,
"nonbsp": true,
"quotmark": "single",
"shadow": "inner",
"undef": true,
"unused": true,
"browser": true,
"jquery": true,
"globals": {
"chrome": true,
"console": true
}
}

61
Gruntfile.js Normal file
View File

@ -0,0 +1,61 @@
var vendorCopy = [
'jquery/dist/jquery.min.js',
'fancybox/source/jquery.fancybox.pack.js',
'fancybox/source/helpers/jquery.fancybox-media.js',
'fancybox/source/jquery.fancybox.css',
'markitup/markitup/jquery.markitup.js',
'markitup/markitup/skins/markitup/style.css',
'soundcloud/soundcloud.player.api.js'
].map(function(file) {
return {
src: 'vendor/' + file,
dest: 'chrome_point_plus/vendor/' + file
};
});
vendorCopy.push({
expand: true,
src: [
'vendor/fancybox/source/*.png',
'vendor/fancybox/source/*.gif'
],
dest: 'chrome_point_plus/'
});
/* global module */
module.exports = function(grunt) {
// Настройки
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
// Что копировать
copy: {
main: {
files: vendorCopy
}
},
bump: {
options: {
files: [ 'package.json', 'bower.json', 'chrome_point_plus/manifest.json' ],
commit: true,
commitMessage: 'Release %VERSION%',
commitFiles: [ 'package.json', 'bower.json', 'chrome_point_plus/manifest.json' ],
createTag: true,
tagName: '%VERSION%',
tagMessage: 'Version %VERSION%',
push: false,
gitDescribeOptions: '--tags --always --abbrev=1 --dirty=-d',
globalReplace: true
}
}
});
// Загрузить плагины
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-bump');
// Что выполнять по команде `grunt`
grunt.registerTask('default', [ 'copy' ]);
};

View File

@ -1,6 +1,6 @@
The MIT License (MIT)
The MIT License (MIT), reference http://www.opensource.org/licenses/mit-license.php
Copyright (c) 2014 Alexey Skobkin
Copyright (c) 2014 Alexey Skobkin <skobkin-ru@ya.ru>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

63
README.md Normal file
View File

@ -0,0 +1,63 @@
# README #
Коротенькое пояснение what the fuck is going on.
### Что это за репозиторий? ###
В данном репозитории располагаются исходные коды расширения Point+, которое предназначено для расширения функциональности сайта [Point.im](https://point.im/).
### Как заставить его работать? ###
Есть несколько вариантов. Выбирайте на свой вкус:
* Установить расширение из [репозитория Opera addons](https://addons.opera.com/en/extensions/details/point/?display=en)
* Установить расширение из [репозитория Google Chrome Extensions](https://chrome.google.com/webstore/detail/point%2B/ghaddonhnchkdjaciggjijhophciboam?hl=ru)
* Установить расширение из [раздела Downloads на Bitbucket](https://bitbucket.org/skobkin/chrome_point_plus/downloads) (*.nex - Opera, *.crx - Chrome)
* Собрать самостоятельно из исходников ([Chrome](https://developer.chrome.com/extensions/packaging), [Opera](https://dev.opera.com/extensions/tut_basics.html))
### Как настраивать? ###
В адресной строке (омнибокс) появится иконка Point.im. Если на нёё нажать - появится окошко настроек.
![Настройки расширения](https://storage4.static.itmages.ru/i/15/0107/h_1420652338_6632200_307d80b672.png "Окно настроек расширения")
### Хочу помочь, ШТОДЕЛОЦ? ###
* Писать мне [в поинте](https://skobkin-ru.point.im/) или [куда-нибудь ещё](https://skobk.in/contacts/)
* Сразу присылать пулл-реквесты с шашкой наголо
* Поставить в магазинах Opera и Chrome оценку расширению
* Задонатить (см. таб Feedback в настройках)
### Как собрать из исходников
Для сборки используется Node.js. Ещё нужно глобально установить npm-пакет grunt-cli (`npm i -g grunt-cli`).
Все команды ниже нужно выполнять в корне проекта.
Установить npm и bower зависимости и разложить библиотеки по местам:
```
npm install
```
Если у вас нет Node.js, то вы можете посмотреть используемые библиотеки в файле `bower.json` и положить их
в `chrome_point_plus/vendor`.
Проверить кодстайл:
```
npm run lint
```
Поднять версию ([примеры](https://github.com/vojtajina/grunt-bump/blob/master/README.md#usage-examples)):
```
grunt bump
```
Запустить сборку расширения браузером:
```
/bin/bash pack_chromium.sh /usr/bin/chromium /path/to/repository/chrome_point_plus /path/to/private/key.pem
```

22
bower.json Normal file
View File

@ -0,0 +1,22 @@
{
"name": "chrome-point-plus",
"version": "1.42.1",
"authors": [
"Alexey Skobkin"
],
"description": "Chrome extension for point.im",
"license": "MIT",
"homepage": "https://bitbucket.org/skobkin/chrome_point_plus",
"private": true,
"ignore": [
"**/.*",
"node_modules",
"chrome_point_plus/vendors/**"
],
"dependencies": {
"jquery": "~3",
"fancybox": "~2.1.5",
"markitup": "~1.1.14",
"soundcloud": "git@github.com:soundcloud/Widget-JS-API.git"
}
}

View File

@ -0,0 +1,204 @@
{
"ext_description": {
"message": "More features for point.im"
},
"ext_author": {
"message": "Alexey Skobkin"
},
"ext_page_action_title": {
"message": "Settings"
},
"options_page_title": {
"message": "Point+ settings"
},
"options_text_saved": {
"message": "Reload page to apply changes."
},
"options_text_new_version": {
"message": "Point+ just updated.\nWould you like to check new features?"
},
"options_tabs_media": {
"message": "Media"
},
"options_tabs_other": {
"message": "Other"
},
"options_tabs_websocket": {
"message": "WebSockets"
},
"options_tabs_feedback": {
"message": "Feedback"
},
"option_fancybox": {
"message": "Enable Fancybox &#9660;"
},
"option_fancybox_images": {
"message": "Use for images"
},
"option_fancybox_videos": {
"message": "Use for videos (YouTube, etc)"
},
"option_fancybox_posts": {
"message": "Use for post links"
},
"option_fancybox_bind_images_to_one_flow": {
"message": "Bind all images to one Fancybox gallery"
},
"option_images_load_original": {
"message": "Load original images instead of thumbnails"
},
"option_embedding": {
"message": "Enable embedding &#9660;"
},
"option_images_load_booru": {
"message": "Load pictures from Booru, Tumblr, etc via @NokitaKaze server"
},
"option_audios_parse_links": {
"message": "Audio from direct links"
},
"option_videos_parse_links": {
"message": "Video from direct links &#9660;"
},
"option_videos_parse_webm": {
"message": "Only webm"
},
"option_videos_parse_all_links": {
"message": "Parse all links"
},
"option_embedding_soundcloud": {
"message": "Soundcloud"
},
"option_embedding_pleercom": {
"message": "Pleer.com"
},
"option_embedding_coubcom": {
"message": "Coub.com"
},
"option_embedding_twitter_tweets": {
"message": "Twitter"
},
"option_embedding_instagram_posts": {
"message": "Instagram"
},
"option_embedding_remove_original_link": {
"message": "Remove original link"
},
"option_nsfw": {
"message": "NSFW content filtering"
},
"option_nsfw_hide_posts":{
"message": "Hide posts with `nsfw` tag from feed"
},
"option_nsfw_blur_posts_images": {
"message": "Blur images in nsfw posts"
},
"option_nsfw_blur_posts_entire": {
"message": "Blur entire nsfw posts"
},
"option_nsfw_blur_comments_images": {
"message": "Blur images in comments in nsfw posts"
},
"option_nsfw_blur_comments_entire": {
"message": "Blur entire comments in nsfw posts"
},
"option_ajax": {
"message": "AJAX"
},
"option_ajax_comments": {
"message": "Send comments via AJAX (CTRL+Enter)"
},
"option_right_panel": {
"message": "Right side panel"
},
"option_right_panel_to_unread": {
"message": "\"Go to unread comment\" button"
},
"option_fluid_layout": {
"message": "Fluid layout"
},
"option_visual_editor_post": {
"message": "Show visual editor for posts"
},
"option_search_with_google": {
"message": "Use Google search in header"
},
"option_ws": {
"message": "Enable WebSockets &#9660;"
},
"option_ws_comments": {
"message": "Process comments &#9660;"
},
"option_ws_comments_color_fadeout": {
"message": "Fade out highlight in 20 sec"
},
"option_ws_comments_notifications": {
"message": "Show desktop notifications"
},
"option_ws_posts": {
"message": "Process posts &#9660;"
},
"option_ws_posts_add": {
"message": "Add posts to the feed"
},
"option_ws_posts_notifications": {
"message": "Show desktop notifications"
},
"option_enlarge_font": {
"message": "Enlarge font size &#9660;"
},
"option_at_before_username": {
"message": "&#64; before username"
},
"option_other_hightlight_post_comments": {
"message": "Highlight post with new comments"
},
"option_other_show_recommendation_count": {
"message": "Show recommendation count and unique commentators count (using @NokitaKaze server)"
},
"option_other_scroll_space_key":{
"message": "Scrolling posts with `space` key"
},
"option_other_comments_nesting_level":{
"message": "Comments Nesting level indicator"
},
"option_other_comments_user_system":{
"message": "Your hints about users"
},
"option_other_comments_count_refresh":{
"message": "Refresh unread posts and comments count in the sidebar"
},
"option_other_comments_count_refresh_title":{
"message": "Page title"
},
"option_other_move_all_to_menu":{
"message": "Move \"All posts\" to left menu"
},
"option_other_remove_fucking_button":{
"message": "Remove the fucking button"
},
"option_other_post_draft_save":{
"message": "Save post drafts"
},
"options_feedback_text": {
"message": "<p>If you find an error do not hesitate to <a href=\"https:\/\/bitbucket.org\/skobkin\/chrome_point_plus\/issues?status=new&status=open\" target=\"_blank\">send me a bug report<\/a>.<\/p><p>Also you can make a donation in the following ways:<\/p><p><iframe frameborder=\"0\" allowtransparency=\"true\" scrolling=\"no\" src=\"https:\/\/money.yandex.ru\/embed\/small.xml?account=41001539215836&quickpay=small&yamoney-payment-type=on&button-text=04&button-size=s&button-color=black&targets=Point%2B&default-sum=150&successURL=https%3A%2F%2Fbitbucket.org%2Fskobkin%2Fchrome_point_plus\" width=\"158\" height=\"31\"><\/p><p><\/iframe><\/p><p><iframe frameborder=\"0\" allowtransparency=\"true\" scrolling=\"no\" src=\"https:\/\/money.yandex.ru\/embed\/small.xml?account=41001539215836&quickpay=small&any-card-payment-type=on&button-text=04&button-size=s&button-color=black&targets=Point%2B&default-sum=150&successURL=https%3A%2F%2Fbitbucket.org%2Fskobkin%2Fchrome_point_plus\" width=\"158\" height=\"31\"><\/iframe><\/p><p><form action=\"https:\/\/www.paypal.com\/cgi-bin\/webscr\" method=\"post\" target=\"_top\"><input type=\"hidden\" name=\"cmd\" value=\"_s-xclick\"><input type=\"hidden\" name=\"hosted_button_id\" value=\"RCW5V6UFXYTRE\"><input type=\"image\" src=\"https:\/\/www.paypalobjects.com\/ru_RU\/RU\/i\/btn\/btn_donateCC_LG.gif\" border=\"0\" name=\"submit\" alt=\"PayPal — более безопасный и легкий способ оплаты через Интернет!\"><img alt=\"\" border=\"0\" src=\"https:\/\/www.paypalobjects.com\/en_US\/i\/scr\/pixel.gif\" width=\"1\" height=\"1\"><\/form><\/p>"
},
"msg_comment_send_failed":{
"message": "Comment send error:"
},
"msg_saving_post_draft":{
"message": "Saving the post..."
},
"msg_success_recommendation": {
"message": "is recommended"
}
}

View File

@ -0,0 +1,205 @@
{
"ext_description": {
"message": "Больше полезных функций для point.im"
},
"ext_author": {
"message": "Алексей Скобкин"
},
"ext_page_action_title": {
"message": "Настройки"
},
"options_page_title": {
"message": "Настройки Point+"
},
"options_text_saved": {
"message": "Для применения изменений перезагрузите страницу."
},
"options_text_new_version": {
"message": "Point+ только что обновился.\nХотите оценить новые функции?"
},
"options_tabs_media": {
"message": "Медиа"
},
"options_tabs_other": {
"message": "Прочее"
},
"options_tabs_websocket": {
"message": "Вебсокеты"
},
"options_tabs_feedback": {
"message": "Связь и донейт"
},
"option_fancybox": {
"message": "Включить Fancybox &#9660;"
},
"option_fancybox_images": {
"message": "Использовать для картинок"
},
"option_fancybox_videos": {
"message": "Использовать для видео (YouTube и т.п.)"
},
"option_fancybox_posts": {
"message": "Использовать для ссылок на посты"
},
"option_fancybox_bind_images_to_one_flow": {
"message": "Связать все картинки в одну галерею Fancybox"
},
"option_images_load_original": {
"message": "Загружать оригиналы вместо миниатюр"
},
"option_embedding": {
"message": "Включить встраивание &#9660;"
},
"option_images_load_booru": {
"message": "Загружать картинки с Booru, Tumblr и т.п. через сервер @NokitaKaze"
},
"option_audios_parse_links": {
"message": "Аудио по прямой ссылке"
},
"option_videos_parse_links": {
"message": "Видео по прямой ссылке &#9660;"
},
"option_videos_parse_webm": {
"message": "Только webm"
},
"option_videos_parse_all_links": {
"message": "Все ссылки на видео"
},
"option_embedding_soundcloud": {
"message": "Soundcloud"
},
"option_embedding_pleercom": {
"message": "Pleer.com"
},
"option_embedding_coubcom": {
"message": "Coub.com"
},
"option_embedding_twitter_tweets": {
"message": "Twitter"
},
"option_embedding_instagram_posts": {
"message": "Instagram"
},
"option_embedding_remove_original_link": {
"message": "Удалять оригинальную ссылку"
},
"option_nsfw": {
"message": "Фильтрация NSFW-контента"
},
"option_nsfw_hide_posts":{
"message": "Скрывать посты из ленты"
},
"option_nsfw_blur_posts_images": {
"message": "Размытие картинок в постах"
},
"option_nsfw_blur_posts_entire": {
"message": "Размытие постов полностью"
},
"option_nsfw_blur_comments_images": {
"message": "Размытие картинок в комментариях"
},
"option_nsfw_blur_comments_entire": {
"message": "Размытие комментариев целиком"
},
"option_ajax": {
"message": "AJAX"
},
"option_ajax_comments": {
"message": "Отправка комментариев через AJAX (CTRL+Enter)"
},
"option_right_panel": {
"message": "Боковая панель справа"
},
"option_right_panel_to_unread": {
"message": "Кнопка \"Перейти к непрочитанному\""
},
"option_fluid_layout": {
"message": "&#34;Резиновая&#34; вёрстка (растянуть сайт по горизонтали)"
},
"option_visual_editor_post": {
"message": "Визуальный редактор постов"
},
"option_search_with_google": {
"message": "Поиск по сайту с помощью Google"
},
"option_ws": {
"message": "Включить вебсокеты &#9660;"
},
"option_ws_comments": {
"message": "Получать комментарии &#9660;"
},
"option_ws_comments_color_fadeout": {
"message": "Затухание подсветки через 20 секунд"
},
"option_ws_comments_notifications": {
"message": "Показывать всплывающие уведомления"
},
"option_ws_posts": {
"message": "Обрабатывать посты &#9660;"
},
"option_ws_posts_add": {
"message": "Автоматически добавлять в ленту"
},
"option_ws_posts_notifications": {
"message": "Показывать всплывающие уведомления"
},
"option_enlarge_font": {
"message": "Увеличить шрифт &#9660;"
},
"option_at_before_username": {
"message": "Пёс перед юзернеймом"
},
"option_other_hightlight_post_comments": {
"message": "Подсвечивать посты с новыми комментариями"
},
"option_other_show_recommendation_count": {
"message": "Показывать количество рекомендаций и уникальных комментаторов в посте (используя сервер @NokitaKaze)"
},
"option_other_scroll_space_key":{
"message": "Скроллинг постов пробелом"
},
"option_other_comments_nesting_level":{
"message": "Индикатор уровня вложенности коммнентариев"
},
"option_other_comments_user_system":{
"message": "Заметки о пользователях на полях"
},
"option_other_comments_count_refresh":{
"message": "Обновление количества непрочитанных постов и комментариев в сайдбаре"
},
"option_other_comments_count_refresh_title":{
"message": "В заголовке страницы"
},
"option_other_move_all_to_menu":{
"message": "Переместить \"Всё подряд\" в левое меню"
},
"option_other_remove_fucking_button":{
"message": "Убрать ёбаную кнопку"
},
"option_other_post_draft_save":{
"message": "Сохранение черновика поста"
},
"options_feedback_text": {
"message": "<p>Нашли ошибку? Не стесняйтесь <a href=\"https:\/\/bitbucket.org\/skobkin\/chrome_point_plus\/issues?status=new&status=open\" target=\"_blank\">сообщить о ней<\/a>.<\/p><p>Также вы можете сделать пожертвование автору:<\/p><p><iframe frameborder=\"0\" allowtransparency=\"true\" scrolling=\"no\" src=\"https:\/\/money.yandex.ru\/embed\/small.xml?account=41001539215836&quickpay=small&yamoney-payment-type=on&button-text=04&button-size=s&button-color=black&targets=Point%2B&default-sum=150&successURL=https%3A%2F%2Fbitbucket.org%2Fskobkin%2Fchrome_point_plus\" width=\"158\" height=\"31\"><\/iframe><\/p><p><iframe frameborder=\"0\" allowtransparency=\"true\" scrolling=\"no\" src=\"https:\/\/money.yandex.ru\/embed\/small.xml?account=41001539215836&quickpay=small&any-card-payment-type=on&button-text=04&button-size=s&button-color=black&targets=Point%2B&default-sum=150&successURL=https%3A%2F%2Fbitbucket.org%2Fskobkin%2Fchrome_point_plus\" width=\"158\" height=\"31\"><\/iframe><\/p><p><form action=\"https:\/\/www.paypal.com\/cgi-bin\/webscr\" method=\"post\" target=\"_top\"><input type=\"hidden\" name=\"cmd\" value=\"_s-xclick\"><input type=\"hidden\" name=\"hosted_button_id\" value=\"WW33X5J5WFSP4\"><input type=\"image\" src=\"https:\/\/www.paypalobjects.com\/ru_RU\/RU\/i\/btn\/btn_donateCC_LG.gif\" border=\"0\" name=\"submit\" alt=\"PayPal — более безопасный и легкий способ оплаты через Интернет!\"><img alt=\"\" border=\"0\" src=\"https:\/\/www.paypalobjects.com\/en_US\/i\/scr\/pixel.gif\" width=\"1\" height=\"1\"><\/form><\/p>"
},
"msg_comment_send_failed":{
"message": "Ошибка отправки комментария:"
},
"msg_saving_post_draft":{
"message": "Сохранение поста..."
},
"msg_success_recommendation": {
"message": "рекомендовано"
}
}

View File

@ -0,0 +1,32 @@
/*
Created on : Jan 7, 2015, 8:58:42 AM
Author : skobkin
*/
/* Fancybox fix */
#fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span {
background-image: url('chrome-extension://__MSG_@@extension_id__/vendor/fancybox/source/fancybox_sprite.png');
}
#fancybox-loading div {
background-image: url('chrome-extension://__MSG_@@extension_id__/vendor/fancybox/source/fancybox_loading.gif');
}
.fancybox-overlay {
background-image: url('chrome-extension://__MSG_@@extension_id__/vendor/fancybox/source/fancybox_overlay.png');
}
.fancybox-nav {
/* To supress errors */
background-image: url('chrome-extension://__MSG_@@extension_id__/vendor/fancybox/source/blank.gif'); /* helps IE */
}
@media only screen and (min-device-pixel-ratio: 1.5) {
#fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span {
background-image: url('chrome-extension://__MSG_@@extension_id__/vendor/fancybox/source/fancybox_sprite@2x.png');
}
#fancybox-loading div {
background-image: url('chrome-extension://__MSG_@@extension_id__/vendor/fancybox/source/fancybox_loading@2x.gif');
}
}

View File

@ -1,274 +0,0 @@
/*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */
.fancybox-wrap,
.fancybox-skin,
.fancybox-outer,
.fancybox-inner,
.fancybox-image,
.fancybox-wrap iframe,
.fancybox-wrap object,
.fancybox-nav,
.fancybox-nav span,
.fancybox-tmp
{
padding: 0;
margin: 0;
border: 0;
outline: none;
vertical-align: top;
}
.fancybox-wrap {
position: absolute;
top: 0;
left: 0;
z-index: 8020;
}
.fancybox-skin {
position: relative;
background: #f9f9f9;
color: #444;
text-shadow: none;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
.fancybox-opened {
z-index: 8030;
}
.fancybox-opened .fancybox-skin {
-webkit-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
-moz-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}
.fancybox-outer, .fancybox-inner {
position: relative;
}
.fancybox-inner {
overflow: hidden;
}
.fancybox-type-iframe .fancybox-inner {
-webkit-overflow-scrolling: touch;
}
.fancybox-error {
color: #444;
font: 14px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
margin: 0;
padding: 15px;
white-space: nowrap;
}
.fancybox-image, .fancybox-iframe {
display: block;
width: 100%;
height: 100%;
}
.fancybox-image {
max-width: 100%;
max-height: 100%;
}
#fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span {
background-image: url('chrome-extension://__MSG_@@extension_id__/images/fancybox_sprite.png');
}
#fancybox-loading {
position: fixed;
top: 50%;
left: 50%;
margin-top: -22px;
margin-left: -22px;
background-position: 0 -108px;
opacity: 0.8;
cursor: pointer;
z-index: 8060;
}
#fancybox-loading div {
width: 44px;
height: 44px;
background: url('chrome-extension://__MSG_@@extension_id__/images/fancybox_loading.gif') center center no-repeat;
}
.fancybox-close {
position: absolute;
top: -18px;
right: -18px;
width: 36px;
height: 36px;
cursor: pointer;
z-index: 8040;
}
.fancybox-nav {
position: absolute;
top: 0;
width: 40%;
height: 100%;
cursor: pointer;
text-decoration: none;
background: transparent url('chrome-extension://__MSG_@@extension_id__/images/blank.gif'); /* helps IE */
-webkit-tap-highlight-color: rgba(0,0,0,0);
z-index: 8040;
}
.fancybox-prev {
left: 0;
}
.fancybox-next {
right: 0;
}
.fancybox-nav span {
position: absolute;
top: 50%;
width: 36px;
height: 34px;
margin-top: -18px;
cursor: pointer;
z-index: 8040;
visibility: hidden;
}
.fancybox-prev span {
left: 10px;
background-position: 0 -36px;
}
.fancybox-next span {
right: 10px;
background-position: 0 -72px;
}
.fancybox-nav:hover span {
visibility: visible;
}
.fancybox-tmp {
position: absolute;
top: -99999px;
left: -99999px;
visibility: hidden;
max-width: 99999px;
max-height: 99999px;
overflow: visible !important;
}
/* Overlay helper */
.fancybox-lock {
overflow: hidden !important;
width: auto;
}
.fancybox-lock body {
overflow: hidden !important;
}
.fancybox-lock-test {
overflow-y: hidden !important;
}
.fancybox-overlay {
position: absolute;
top: 0;
left: 0;
overflow: hidden;
display: none;
z-index: 8010;
background: url('chrome-extension://__MSG_@@extension_id__/images/fancybox_overlay.png');
}
.fancybox-overlay-fixed {
position: fixed;
bottom: 0;
right: 0;
}
.fancybox-lock .fancybox-overlay {
overflow: auto;
overflow-y: scroll;
}
/* Title helper */
.fancybox-title {
visibility: hidden;
font: normal 13px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
position: relative;
text-shadow: none;
z-index: 8050;
}
.fancybox-opened .fancybox-title {
visibility: visible;
}
.fancybox-title-float-wrap {
position: absolute;
bottom: 0;
right: 50%;
margin-bottom: -35px;
z-index: 8050;
text-align: center;
}
.fancybox-title-float-wrap .child {
display: inline-block;
margin-right: -100%;
padding: 2px 20px;
background: transparent; /* Fallback for web browsers that doesn't support RGBa */
background: rgba(0, 0, 0, 0.8);
-webkit-border-radius: 15px;
-moz-border-radius: 15px;
border-radius: 15px;
text-shadow: 0 1px 2px #222;
color: #FFF;
font-weight: bold;
line-height: 24px;
white-space: nowrap;
}
.fancybox-title-outside-wrap {
position: relative;
margin-top: 10px;
color: #fff;
}
.fancybox-title-inside-wrap {
padding-top: 10px;
}
.fancybox-title-over-wrap {
position: absolute;
bottom: 0;
left: 0;
color: #fff;
padding: 10px;
background: #000;
background: rgba(0, 0, 0, .8);
}
/*Retina graphics!*/
@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
only screen and (min--moz-device-pixel-ratio: 1.5),
only screen and (min-device-pixel-ratio: 1.5){
#fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span {
background-image: url('chrome-extension://__MSG_@@extension_id__/images/fancybox_sprite@2x.png');
background-size: 44px 152px; /*The size of the normal image, half the size of the hi-res image*/
}
#fancybox-loading div {
background-image: url('chrome-extension://__MSG_@@extension_id__/images/fancybox_loading@2x.gif');
background-size: 24px 24px; /*The size of the normal image, half the size of the hi-res image*/
}
}

View File

@ -1,147 +1,36 @@
/* -------------------------------------------------------------------
// markItUp! Universal MarkUp Engine, JQuery plugin
// By Jay Salvat - http://markitup.jaysalvat.com/
// ------------------------------------------------------------------*/
.markItUp * {
margin:0px; padding:0px;
outline:none;
}
.markItUp a:link,
.markItUp a:visited {
color:#000;
text-decoration:none;
}
.markItUp {
width:700px;
margin:5px 0 5px 0;
border:5px solid #F5F5F5;
}
.markItUpContainer {
border:1px solid #3C769D;
background:#FFF url(chrome-extension://__MSG_@@extension_id__/images/markitup/skins/markitup/bg-container.png) repeat-x top left;
padding:5px 5px 2px 5px;
font:11px Verdana, Arial, Helvetica, sans-serif;
background-image: url(chrome-extension://__MSG_@@extension_id__/images/markitup/skins/markitup/bg-container.png);
}
.markItUpEditor {
font:12px 'Courier New', Courier, monospace;
padding:5px 5px 5px 5px/*35px*/;
border:3px solid #3C769D;
width:643px;
height:320px;
/*background:#FFF url(chrome-extension://__MSG_@@extension_id__/images/markitup/skins/markitup/bg-editor.png) no-repeat;*/
clear:both;
line-height:18px;
overflow:auto;
}
.markItUpPreviewFrame {
overflow:auto;
background-color:#FFFFFF;
border:1px solid #3C769D;
width:99.9%;
height:300px;
margin:5px 0;
}
.markItUpFooter {
width:100%;
cursor:n-resize;
background: none;
/* Padding fix */
padding-left: 10px;
}
.markItUpResizeHandle {
overflow:hidden;
width:22px; height:5px;
margin-left:auto;
margin-right:auto;
background-image:url(chrome-extension://__MSG_@@extension_id__/images/markitup/skins/markitup/handle.png);
cursor:n-resize;
}
/***************************************************************************************/
/* first row of buttons */
.markItUpHeader ul li {
list-style:none;
float:left;
position:relative;
}
.markItUpHeader ul li ul{
display:none;
}
.markItUpHeader ul li:hover > ul{
display:block;
}
.markItUpHeader ul .markItUpDropMenu {
background:transparent url(chrome-extension://__MSG_@@extension_id__/images/markitup/skins/markitup/menu.png) no-repeat 115% 50%;
margin-right:5px;
}
.markItUpHeader ul .markItUpDropMenu li {
margin-right:0px;
}
.markItUpHeader ul .markItUpSeparator {
margin:0 10px;
width:1px;
height:16px;
overflow:hidden;
background-color:#CCC;
}
.markItUpHeader ul ul .markItUpSeparator {
width:auto; height:1px;
margin:0px;
}
/* next rows of buttons */
.markItUpHeader ul ul {
display:none;
position:absolute;
top:18px; left:0px;
background:#F5F5F5;
border:1px solid #3C769D;
height:inherit;
}
.markItUpHeader ul ul li {
float:none;
border-bottom:1px solid #3C769D;
background-image: url(chrome-extension://__MSG_@@extension_id__/images/markitup/skins/markitup/menu.png);
}
.markItUpHeader ul ul .markItUpDropMenu {
background:#F5F5F5 url(chrome-extension://__MSG_@@extension_id__/images/markitup/skins/markitup/submenu.png) no-repeat 100% 50%;
}
/* next rows of buttons */
.markItUpHeader ul ul ul {
position:absolute;
top:-1px; left:150px;
}
.markItUpHeader ul ul ul li {
float:none;
}
.markItUpHeader ul a {
display:block;
width:16px; height:16px;
text-indent:-10000px;
background-repeat:no-repeat;
padding:3px;
margin:0px;
}
.markItUpHeader ul ul a {
display:block;
padding-left:0px;
text-indent:0;
width:120px;
padding:5px 5px 5px 25px;
background-position:2px 50%;
}
.markItUpHeader ul ul a:hover {
color:#FFF;
background-color:#3C769D;
background-image: url(chrome-extension://__MSG_@@extension_id__/images/markitup/skins/markitup/submenu.png);
}
/***************************************************************************************/
.html .markItUpEditor {
background-image:url(chrome-extension://__MSG_@@extension_id__/images/markitup/skins/markitup/bg-editor-html.png);
background-image: url(chrome-extension://__MSG_@@extension_id__/images/markitup/skins/markitup/bg-editor-html.png);
}
.markdown .markItUpEditor {
background-image:url(chrome-extension://__MSG_@@extension_id__/images/markitup/skins/markitup/bg-editor-markdown.png);
background-image: url(chrome-extension://__MSG_@@extension_id__/images/markitup/skins/markitup/bg-editor-markdown.png);
}
.textile .markItUpEditor {
background-image:url(chrome-extension://__MSG_@@extension_id__/images/markitup/skins/markitup/bg-editor-textile.png);
background-image: url(chrome-extension://__MSG_@@extension_id__/images/markitup/skins/markitup/bg-editor-textile.png);
}
.bbcode .markItUpEditor {
background-image:url(chrome-extension://__MSG_@@extension_id__/images/markitup/skins/markitup/bg-editor-bbcode.png);
background-image: url(chrome-extension://__MSG_@@extension_id__/images/markitup/skins/markitup/bg-editor-bbcode.png);
}
.wiki .markItUpEditor,
.dotclear .markItUpEditor {
background-image:url(chrome-extension://__MSG_@@extension_id__/images/markitup/skins/markitup/bg-editor-wiki.png);
background-image: url(chrome-extension://__MSG_@@extension_id__/images/markitup/skins/markitup/bg-editor-wiki.png);
}

View File

@ -1,8 +1,12 @@
/* @ before username */
#main #content a.user:before {
/* Posts */
#content .post-content a.user:before,
/* Subscribers */
#content .users span.user:before,
/* Subscriptions */
#content .users .info a.user:before {
content: "@";
}
/* Fix for recommendations in the feed */
#main #content .rec .user:before {
margin-right: -4px;
/* Fix for recommendations */
#content .post-content .rec .user:before {
margin-right: -3px;
}

View File

@ -0,0 +1,28 @@
#pp-right-panel {
width: 32px;
position: fixed;
top: 50%;
right: 3px;
opacity: .3;
transition: opacity 500ms;
}
#pp-right-panel:hover {
opacity: 1;
transition: opacity 500ms;
}
#pp-right-panel #pp-go-to-unread {
background-image: url("/img/menu-my.png");
height: 32px;
width: 32px;
cursor: pointer;
}
#pp-right-panel span#pp-unread-count {
position: relative;
top: 7px;
left: 11px;
-webkit-user-select: none;
user-select: none;
}

View File

@ -0,0 +1,162 @@
/* Options page */
body
{
font-family: Arial;
font-size: 14px;
line-height: 20px;
width: 450px;
height: 450px;
margin: 0;
padding: 5px;
color: #000;
background: #eee;
}
a
{
color: #1abef1;
}
p
{
margin: 0;
padding: 0;
}
.tabs-list
{
position: relative;
z-index: 1;
display: block;
margin: 0 0 -1px;
padding: 0;
}
.tabs-item
{
display: inline-block;
padding: 7px 15px 3px;
list-style-type: none;
text-decoration: none;
border: 1px solid transparent;
}
.tabs-item.selected
{
cursor: default;
border-color: #dedede;
border-bottom-color: #fff;
background: #fff;
}
.tabs-content
{
position: relative;
height: 345px;
margin: 0;
padding: 0;
border: 1px solid #dedede;
border-radius: 0 0 3px 3px;
background: #fff;
}
.tabs-content::before
{
position: absolute;
top: 0;
right: 0;
left: 0;
height: 20px;
content: '';
background-image: linear-gradient(to bottom, rgba(255,255,255,1) 0%, rgba(255,255,255,1) 30%, rgba(255,255,255,0) 100%);
background-size: 20px 20px;
}
.tabs-content-item
{
display: none;
overflow: auto;
box-sizing: border-box;
max-height: 100%;
margin: 0;
padding: 20px 15px 5px;
border: none;
background: transparent;
}
.tabs-content-item.selected
{
display: block;
}
input[type='checkbox']
{
margin-right: 5px;
margin-left: 0;
vertical-align: 1px;
}
.option-node
{
display: block;
padding: 0 0 5px 21px;
text-indent: -21px;
}
.option-node input[type='checkbox']:not(:checked) ~ .option-node
{
display: none;
}
.option-node input[type='checkbox']:not(:checked) ~ .option-node label
{
color: #999;
}
.footer
{
margin: 0;
padding: 10px 15px;
}
.saved
{
position: relative;
z-index: 1;
margin: -2px 1px 0;
padding: 10px 15px;
transition: all .2s;
transform-origin: 50% 0;
color: #fff;
border-top: 1px solid #dedede;
border-radius: 0 0 2px 2px;
background: #4caf50;
}
.saved.hidden
{
transform: scaleY(.5);
opacity: 0;
}

View File

@ -27,131 +27,233 @@ div#markItUpText-input {
position: relative;
}
/* Options page */
.pp-options {
width: 450px;
height: 450px;
background: #EEE;
/* Auto-loaded Booru pictures */
.booru_pic, .instagram-post-embedded {
display: block !important;
float: none !important;
}
/* Tabs style */
.pp-options .usual {
width:450px;
margin: 5px;
.booru_pic img, .instagram-post-embedded img {
border: none;
max-width: 60%;
max-height: 300px;
}
.pp-options .usual ul {
padding: 0 0 10px 0;
margin: 0 0 18px 0;
}
.pp-options .usual li {
list-style: none;
/* Unique ID and Recomendation */
.pp-post-counters
{
float: left;
}
.pp-options .usual ul a {
display: block;
padding: 6px 10px;
text-decoration: none!important;
margin: 1px;
margin-left: 0;
font: 12px Georgia;
color: #FFF;
background: #C8C8C8;
border-radius: 15px 15px 0 0;
}
.pp-options .usual ul a:hover {
color: #FFF;
background: #BBB;
}
.pp-options .usual ul a.selected {
margin-bottom: 0;
color: #FFF;
background: #A5A5A5;
cursor: default;
}
.pp-options .usual div#tabs-content {
margin: 0 5px 0 0;
padding: 5px;
background-color: #A5A5A5;
border-radius: 0 15px 0 0;
}
.pp-options .usual #panel {
background: #B5B5B5;
margin: 0 5px 0 0;
padding: 10px;
border-radius: 0 0 15px 15px;
display: flex;
}
.pp-options .usual #panel button.button {
background-color: #C8C8C8;
border-radius:15px;
border:1px solid #dcdcdc;
display:inline-block;
cursor:pointer;
color:#000;
font-family:Arial;
font-size:15px;
font-weight:bold;
padding: 5px 25px;
text-decoration:none;
text-shadow:0px 1px 0px #ffffff;
}
.pp-options .usual #panel button.button:hover{
background-color:#BBB;
}
.pp-options .usual #panel button.button:active {
position:relative;
top:1px;
color: #999;
font-size: 12px;
margin-left: 1em;
}
.pp-options .usual div a {
color: #000;
font-weight: bold;
.pp-unique-comments
{
margin-right: .5em;
}
.pp-options .tab-content {
padding: 5px 0 0 5px;
/* @todo i18n */
.pp-unique-comments::before
{
content: 'Комментаторов: ';
}
.pp-options .option {
display: block;
margin: 5px 0 5px 15px;
.pp-recommendation-count::before
{
content: 'Рекомендаций: ';
}
.pp-options .option label {
font: 10pt Georgia;
color: #FFF;
/* NSFW-content */
.post-tag-nsfw.blur-nsfw-images a.postimg img,
.post-tag-сиськи.blur-nsfw-images a.postimg img,
#comments.blur-nsfw-images a.postimg img {
margin-top: 5px;
-webkit-filter: blur(30px);
}
.pp-options .tab-content .text {
margin-left: 15px;
.post-tag-nsfw.blur-nsfw-images a.postimg:hover img,
.post-tag-сиськи.blur-nsfw-images a.postimg:hover img,
#comments.blur-nsfw-images a.postimg:hover img {
-webkit-filter: none;
}
/* Disables subcheckboxes if parent disabled */
.pp-options .option input[type="checkbox"]:not(:checked) ~.option {
.post-tag-nsfw.hide-nsfw-posts,
.post-tag-сиськи.hide-nsfw-posts {
display: none;
}
.pp-options .option input[type="checkbox"]:not(:checked) ~.option label {
color: #BBB;
.post-tag-nsfw.blur-nsfw-entire .post-content .text,
.post-tag-сиськи.blur-nsfw-entire .post-content .text,
#comments.blur-nsfw-entire .post-content .text {
-webkit-filter: blur(30px);
}
/* Panel */
.pp-options .left, .pp-options .right {
width: 50%;
.post-tag-nsfw.hide-nsfw-posts,
.post-tag-сиськи.hide-nsfw-posts {
display: none;
}
.pp-options .left {
float: left;
/* Черновики */
#new-post-form #text-input {
height: 30em !important;
}
.pp-options .right {
#new-post-form #draft-save-status {
display: none;
padding: 3px 5px;
color: green;
}
/* point-plus-debug */
#point-plus-debug {
float: right;
display: block;
color: rgba(255, 255, 255, .75);
padding: 10px 0px;
}
.pp-options #pp-version {
margin-top: 6px;
text-align: right;
/* User hints */
.current-user-hint {
min-height: 30px;
position: relative;
}
.current-user-hint .edit {
position: absolute;
right: 5px;
top: 5px;
display: none;
background-image: url('//point.im/img/btn-edit.png');
background-size: 100% 100%;
width: 16px;
height: 16px;
}
.current-user-hint:hover .edit {
display: block;
}
.current-user-hint > .text {
margin: 1em 0;
color: green;
font-style: italic;
}
.aside .aside-content #counters {
clear: both;
}
.current-user-hint .change_hint_block {
}
.current-user-hint .change_hint_block textarea {
width: 98%;
max-width: 98%;
margin-bottom: 10px;
height: 140px;
}
.current-user-hint .change_hint_block .button_save {
margin-right: 10px;
}
.current-user-hint .change_hint_block .button_cancel {
}
/** Индикация вложенности */
#comments.nesting_level {
overflow: hidden;
}
#comments.nesting_level .info::before {
position: absolute;
top: 0;
right: 100%;
display: block;
width: 500px;
height: 24px;
content: '';
opacity: 0;
background-image: url('chrome-extension://__MSG_@@extension_id__/images/nesting-point.svg');
background-repeat: repeat-x;
background-position: right center;
}
#comments.nesting_level .post:hover .info::before {
transition: opacity .2s ease-in;
opacity: 1;
}
.pp-progress.reply-form {
margin-top: 8px;
padding-top: 4px;
}
.pp-progress.reply-form::before {
content: '';
display: block;
height: 4px;
background: linear-gradient(to right, #fff, #9aacbe, #fff);
-webkit-animation: loading 1s;
-webkit-animation-iteration-count: infinite;
}
@-webkit-keyframes loading {
from {
background-position: -640px 0;
}
to {
background-position: 0 0;
}
}
/* "All" link in left menu */
#pp-left-menu-all {
/* Opened Lock icon from default point.im icon set */
background-image: url('/img/icon-private-inactive.png') !important;
}
/* Highlight post with new comments */
.pp-post-unread {
background-color: #EEFFEE;
}
/* Video from direct links */
.pp-video-player {
display: block;
max-width: 95%;
}
/* Audio from direct links */
.pp-audio-player {
display: block;
}
/* Coub embedded video */
.pp-video-player-coub {
max-width: 640px;
border: none;
}
/* New posts and comments auto refresh in left menu by @NokitaKaze */
.pp-left-menu-refreshed {
background-color: #f2ebee;
color: #7c3558;
}
#pp-iframe-unread-refresh {
width: 600px;
height: 300px;
display: none;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1003 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

View File

@ -0,0 +1 @@
<svg version="1" xmlns="http://www.w3.org/2000/svg" height="10" width="10"><circle cx="5" cy="5" r="3" fill="#9aacbe"/></svg>

After

Width:  |  Height:  |  Size: 125 B

View File

@ -1,46 +1,204 @@
// Message listener
chrome.extension.onMessage.addListener(function(message, sender) {
console.log('Received message: %O', message);
var VERSION = (function() {
/**
* @deprecated XMLHttpRequest in the background worker is deprecated
* according to the Chrome warning. But we definitely need synchronous
* AJAX here
*/
var xhr = new XMLHttpRequest(),
manifest;
if (message) {
switch (message.type) {
case 'showPageAction':
var tab = sender.tab;
chrome.pageAction.show(tab.id);
break;
xhr.open('GET', chrome.extension.getURL('manifest.json'), false);
xhr.send(null);
case 'showNotification':
console.log(chrome.notifications.create(
manifest = JSON.parse(xhr.responseText);
return manifest.version;
})();
/**
* Вставка нескольких файлов друг за другом
* @param {Array} files Список файлов
* @param {Function} injectOne Функция вставки одного файла. Должна принимать file и callback
* @param {Function} [onAllInjected] Функция обработки ответа
* @param {Array} [results] Результаты вставки (их не нужно передавать при запуске извне)
*/
function injectFiles(files, injectOne, onAllInjected, results) {
results = results || [];
if (files.length) {
injectOne(files.shift(), function(res) {
if (res) {
results.unshift(res[0]);
}
injectFiles(files, injectOne, onAllInjected, results);
});
} else {
onAllInjected(results);
}
}
/**
* @constructor Менеджер сообщений
*/
function MessageListener() {
/* jshint unused:false */
chrome.runtime.onMessage.addListener(function(message, sender, sendResponse) {
if (this.isMethodAvailable(message)) {
console.info('Call #%s() method for tab #%s', message.type, this.getTabId(sender));
this[message.type].apply(this, arguments);
return true;
} else {
console.warn('Method #%s() called from tab #%s does not exists', message.type, this.getTabId(sender));
return false;
}
}.bind(this));
/* jshint unused:true */
}
/**
* @param {Object} message Сообщение
* @returns {Boolean} Есть ли необходимый метод в MessageListener
*/
MessageListener.prototype.isMethodAvailable = function(message) {
return message && message.type && typeof this[message.type] === 'function';
};
/**
* @param {Object} sender
* @returns {Number|Null} Идентификатор вкладки, с которой пришло сообщение
*/
MessageListener.prototype.getTabId = function(sender) {
return sender.tab && sender.tab.id || null;
};
/**
* @param {Object} message Сообщение
* @param {Object} sender Отправитель
* @param {Function} sendResponse Коллбек для обработки результата
*/
MessageListener.prototype.showPageAction = function(message, sender, sendResponse) {
chrome.pageAction.show(this.getTabId(sender));
sendResponse(true);
};
/**
* Показывает нотификацию
* @param {Object} message Сообщение
* @param {Object} sender Отправитель
* @param {Function} sendResponse Коллбек для обработки результата
*/
MessageListener.prototype.showNotification = function(message, sender, sendResponse) {
chrome.notifications.create(
message.notificationId, {
type: 'basic',
iconUrl: message.avatarUrl,
title: message.title,
message: message.text,
priority: 0
priority: 0,
isClickable: true
}, function(notificationId) {
console.info('Notification "%s" created', notificationId);
sendResponse(true);
}
);
};
/**
* Получает версию плагина из манифеста
* @param {Object} message Сообщение
* @param {Object} sender Отправитель
* @param {Function} sendResponse Коллбек для обработки результата
*/
MessageListener.prototype.getManifestVersion = function(message, sender, sendResponse) {
sendResponse({ version: VERSION });
};
/**
* @param {Object} message Сообщение
*/
MessageListener.prototype.getFiles = function(message, defaultRunAt) {
var files;
if (! message.files) {
return false;
} else {
files = Array.isArray(message.files) ? message.files : [ message.files ];
return files.map(function(file) {
return {
file: typeof file === 'string' ? file : file.file,
runAt: file.runAt || defaultRunAt
};
});
}
};
/**
* Вставляет JS-файлы во вкладку
* @param {Object} message Сообщение
* @param {Object} sender Отправитель
* @param {Function} sendResponse Коллбек для обработки результата
*/
MessageListener.prototype.executeJSFiles = function(message, sender, sendResponse) {
var tabId = this.getTabId(sender);
injectFiles(
this.getFiles(message, 'document_end'),
function(file, callback) {
chrome.tabs.executeScript(tabId, file, callback);
},
function() { /* Error checking goes here */}
));
break;
sendResponse
);
};
case 'injectJS':
/**
* Вставляет CSS-файлы во вкладку
* @param {Object} message Сообщение
* @param {Object} sender Отправитель
* @param {Function} sendResponse Коллбек для обработки результата
*/
MessageListener.prototype.injectCSSFiles = function(message, sender, sendResponse) {
var tabId = this.getTabId(sender);
break;
injectFiles(
this.getFiles(message),
function(file, callback) {
chrome.tabs.insertCSS(tabId, file, callback);
},
sendResponse
);
};
case 'injectCSSFile':
console.log('Injecting CSS: %s', message.file);
chrome.tabs.insertCSS(null, {
file: message.file
});
break;
new MessageListener();
case 'injectCSSCode':
if (message.code !== undefined) {
chrome.tabs.insertCSS(null, {
code: message.code
});
}
// Maintaining options version
chrome.storage.sync.get('options_version', function(data) {
console.info('Point+ %s. Options are for %s.', VERSION, data.options_version);
break;
}
if (data.options_version !== VERSION) {
chrome.tabs.create({ url: 'options.html' });
}
});
// Adding notification click event listener
chrome.notifications.onClicked.addListener(function(notificationId) {
var tab_url;
// Detecting notification type
if (notificationId.indexOf('comment_') === 0) {
tab_url = 'https://point.im/' + notificationId.replace(/comment_/g, '');
} else if (notificationId.indexOf('post_') === 0) {
tab_url = 'https://point.im/' + notificationId.replace(/post_/g, '');
}
console.log('Notification %s clicked! Opening new tab: %s', notificationId, tab_url);
if (tab_url !== undefined) {
chrome.tabs.create({
url: tab_url
});
}
});

View File

@ -0,0 +1,6 @@
document.addEventListener('DOMContentLoaded', function() {
// Processing all emenents contains data-i18n attribute
Array.prototype.forEach.call(document.querySelectorAll('[data-i18n]'), function(elem) {
elem.innerHTML = chrome.i18n.getMessage(elem.dataset.i18n);
});
}, false);

File diff suppressed because one or more lines are too long

View File

@ -1,199 +0,0 @@
/*!
* Media helper for fancyBox
* version: 1.0.6 (Fri, 14 Jun 2013)
* @requires fancyBox v2.0 or later
*
* Usage:
* $(".fancybox").fancybox({
* helpers : {
* media: true
* }
* });
*
* Set custom URL parameters:
* $(".fancybox").fancybox({
* helpers : {
* media: {
* youtube : {
* params : {
* autoplay : 0
* }
* }
* }
* }
* });
*
* Or:
* $(".fancybox").fancybox({,
* helpers : {
* media: true
* },
* youtube : {
* autoplay: 0
* }
* });
*
* Supports:
*
* Youtube
* http://www.youtube.com/watch?v=opj24KnzrWo
* http://www.youtube.com/embed/opj24KnzrWo
* http://youtu.be/opj24KnzrWo
* http://www.youtube-nocookie.com/embed/opj24KnzrWo
* Vimeo
* http://vimeo.com/40648169
* http://vimeo.com/channels/staffpicks/38843628
* http://vimeo.com/groups/surrealism/videos/36516384
* http://player.vimeo.com/video/45074303
* Metacafe
* http://www.metacafe.com/watch/7635964/dr_seuss_the_lorax_movie_trailer/
* http://www.metacafe.com/watch/7635964/
* Dailymotion
* http://www.dailymotion.com/video/xoytqh_dr-seuss-the-lorax-premiere_people
* Twitvid
* http://twitvid.com/QY7MD
* Twitpic
* http://twitpic.com/7p93st
* Instagram
* http://instagr.am/p/IejkuUGxQn/
* http://instagram.com/p/IejkuUGxQn/
* Google maps
* http://maps.google.com/maps?q=Eiffel+Tower,+Avenue+Gustave+Eiffel,+Paris,+France&t=h&z=17
* http://maps.google.com/?ll=48.857995,2.294297&spn=0.007666,0.021136&t=m&z=16
* http://maps.google.com/?ll=48.859463,2.292626&spn=0.000965,0.002642&t=m&z=19&layer=c&cbll=48.859524,2.292532&panoid=YJ0lq28OOy3VT2IqIuVY0g&cbp=12,151.58,,0,-15.56
*/
(function ($) {
"use strict";
//Shortcut for fancyBox object
var F = $.fancybox,
format = function( url, rez, params ) {
params = params || '';
if ( $.type( params ) === "object" ) {
params = $.param(params, true);
}
$.each(rez, function(key, value) {
url = url.replace( '$' + key, value || '' );
});
if (params.length) {
url += ( url.indexOf('?') > 0 ? '&' : '?' ) + params;
}
return url;
};
//Add helper object
F.helpers.media = {
defaults : {
youtube : {
matcher : /(youtube\.com|youtu\.be|youtube-nocookie\.com)\/(watch\?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*)).*/i,
params : {
autoplay : 1,
autohide : 1,
fs : 1,
rel : 0,
hd : 1,
wmode : 'opaque',
enablejsapi : 1
},
type : 'iframe',
url : '//www.youtube.com/embed/$3'
},
vimeo : {
matcher : /(?:vimeo(?:pro)?.com)\/(?:[^\d]+)?(\d+)(?:.*)/,
params : {
autoplay : 1,
hd : 1,
show_title : 1,
show_byline : 1,
show_portrait : 0,
fullscreen : 1
},
type : 'iframe',
url : '//player.vimeo.com/video/$1'
},
metacafe : {
matcher : /metacafe.com\/(?:watch|fplayer)\/([\w\-]{1,10})/,
params : {
autoPlay : 'yes'
},
type : 'swf',
url : function( rez, params, obj ) {
obj.swf.flashVars = 'playerVars=' + $.param( params, true );
return '//www.metacafe.com/fplayer/' + rez[1] + '/.swf';
}
},
dailymotion : {
matcher : /dailymotion.com\/video\/(.*)\/?(.*)/,
params : {
additionalInfos : 0,
autoStart : 1
},
type : 'swf',
url : '//www.dailymotion.com/swf/video/$1'
},
twitvid : {
matcher : /twitvid\.com\/([a-zA-Z0-9_\-\?\=]+)/i,
params : {
autoplay : 0
},
type : 'iframe',
url : '//www.twitvid.com/embed.php?guid=$1'
},
twitpic : {
matcher : /twitpic\.com\/(?!(?:place|photos|events)\/)([a-zA-Z0-9\?\=\-]+)/i,
type : 'image',
url : '//twitpic.com/show/full/$1/'
},
instagram : {
matcher : /(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i,
type : 'image',
url : '//$1/p/$2/media/?size=l'
},
google_maps : {
matcher : /maps\.google\.([a-z]{2,3}(\.[a-z]{2})?)\/(\?ll=|maps\?)(.*)/i,
type : 'iframe',
url : function( rez ) {
return '//maps.google.' + rez[1] + '/' + rez[3] + '' + rez[4] + '&output=' + (rez[4].indexOf('layer=c') > 0 ? 'svembed' : 'embed');
}
}
},
beforeLoad : function(opts, obj) {
var url = obj.href || '',
type = false,
what,
item,
rez,
params;
for (what in opts) {
if (opts.hasOwnProperty(what)) {
item = opts[ what ];
rez = url.match( item.matcher );
if (rez) {
type = item.type;
params = $.extend(true, {}, item.params, obj[ what ] || ($.isPlainObject(opts[ what ]) ? opts[ what ].params : null));
url = $.type( item.url ) === "function" ? item.url.call( this, rez, params, obj ) : format( item.url, rez, params );
break;
}
}
}
if (type) {
obj.href = url;
obj.type = type;
obj.autoHeight = false;
}
}
};
}(jQuery));

View File

@ -1,46 +0,0 @@
/*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */
(function(r,G,f,v){var J=f("html"),n=f(r),p=f(G),b=f.fancybox=function(){b.open.apply(this,arguments)},I=navigator.userAgent.match(/msie/i),B=null,s=G.createTouch!==v,t=function(a){return a&&a.hasOwnProperty&&a instanceof f},q=function(a){return a&&"string"===f.type(a)},E=function(a){return q(a)&&0<a.indexOf("%")},l=function(a,d){var e=parseInt(a,10)||0;d&&E(a)&&(e*=b.getViewport()[d]/100);return Math.ceil(e)},w=function(a,b){return l(a,b)+"px"};f.extend(b,{version:"2.1.5",defaults:{padding:15,margin:20,
width:800,height:600,minWidth:100,minHeight:100,maxWidth:9999,maxHeight:9999,pixelRatio:1,autoSize:!0,autoHeight:!1,autoWidth:!1,autoResize:!0,autoCenter:!s,fitToView:!0,aspectRatio:!1,topRatio:0.5,leftRatio:0.5,scrolling:"auto",wrapCSS:"",arrows:!0,closeBtn:!0,closeClick:!1,nextClick:!1,mouseWheel:!0,autoPlay:!1,playSpeed:3E3,preload:3,modal:!1,loop:!0,ajax:{dataType:"html",headers:{"X-fancyBox":!0}},iframe:{scrolling:"auto",preload:!0},swf:{wmode:"transparent",allowfullscreen:"true",allowscriptaccess:"always"},
keys:{next:{13:"left",34:"up",39:"left",40:"up"},prev:{8:"right",33:"down",37:"right",38:"down"},close:[27],play:[32],toggle:[70]},direction:{next:"left",prev:"right"},scrollOutside:!0,index:0,type:null,href:null,content:null,title:null,tpl:{wrap:'<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',image:'<img class="fancybox-image" src="{href}" alt="" />',iframe:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen'+
(I?' allowtransparency="true"':"")+"></iframe>",error:'<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',closeBtn:'<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>',next:'<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',prev:'<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>'},openEffect:"fade",openSpeed:250,openEasing:"swing",openOpacity:!0,
openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:!0,title:!0},onCancel:f.noop,beforeLoad:f.noop,afterLoad:f.noop,beforeShow:f.noop,afterShow:f.noop,beforeChange:f.noop,beforeClose:f.noop,afterClose:f.noop},group:{},opts:{},previous:null,coming:null,current:null,isActive:!1,
isOpen:!1,isOpened:!1,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(a,d){if(a&&(f.isPlainObject(d)||(d={}),!1!==b.close(!0)))return f.isArray(a)||(a=t(a)?f(a).get():[a]),f.each(a,function(e,c){var k={},g,h,j,m,l;"object"===f.type(c)&&(c.nodeType&&(c=f(c)),t(c)?(k={href:c.data("fancybox-href")||c.attr("href"),title:c.data("fancybox-title")||c.attr("title"),isDom:!0,element:c},f.metadata&&f.extend(!0,k,
c.metadata())):k=c);g=d.href||k.href||(q(c)?c:null);h=d.title!==v?d.title:k.title||"";m=(j=d.content||k.content)?"html":d.type||k.type;!m&&k.isDom&&(m=c.data("fancybox-type"),m||(m=(m=c.prop("class").match(/fancybox\.(\w+)/))?m[1]:null));q(g)&&(m||(b.isImage(g)?m="image":b.isSWF(g)?m="swf":"#"===g.charAt(0)?m="inline":q(c)&&(m="html",j=c)),"ajax"===m&&(l=g.split(/\s+/,2),g=l.shift(),l=l.shift()));j||("inline"===m?g?j=f(q(g)?g.replace(/.*(?=#[^\s]+$)/,""):g):k.isDom&&(j=c):"html"===m?j=g:!m&&(!g&&
k.isDom)&&(m="inline",j=c));f.extend(k,{href:g,type:m,content:j,title:h,selector:l});a[e]=k}),b.opts=f.extend(!0,{},b.defaults,d),d.keys!==v&&(b.opts.keys=d.keys?f.extend({},b.defaults.keys,d.keys):!1),b.group=a,b._start(b.opts.index)},cancel:function(){var a=b.coming;a&&!1!==b.trigger("onCancel")&&(b.hideLoading(),b.ajaxLoad&&b.ajaxLoad.abort(),b.ajaxLoad=null,b.imgPreload&&(b.imgPreload.onload=b.imgPreload.onerror=null),a.wrap&&a.wrap.stop(!0,!0).trigger("onReset").remove(),b.coming=null,b.current||
b._afterZoomOut(a))},close:function(a){b.cancel();!1!==b.trigger("beforeClose")&&(b.unbindEvents(),b.isActive&&(!b.isOpen||!0===a?(f(".fancybox-wrap").stop(!0).trigger("onReset").remove(),b._afterZoomOut()):(b.isOpen=b.isOpened=!1,b.isClosing=!0,f(".fancybox-item, .fancybox-nav").remove(),b.wrap.stop(!0,!0).removeClass("fancybox-opened"),b.transitions[b.current.closeMethod]())))},play:function(a){var d=function(){clearTimeout(b.player.timer)},e=function(){d();b.current&&b.player.isActive&&(b.player.timer=
setTimeout(b.next,b.current.playSpeed))},c=function(){d();p.unbind(".player");b.player.isActive=!1;b.trigger("onPlayEnd")};if(!0===a||!b.player.isActive&&!1!==a){if(b.current&&(b.current.loop||b.current.index<b.group.length-1))b.player.isActive=!0,p.bind({"onCancel.player beforeClose.player":c,"onUpdate.player":e,"beforeLoad.player":d}),e(),b.trigger("onPlayStart")}else c()},next:function(a){var d=b.current;d&&(q(a)||(a=d.direction.next),b.jumpto(d.index+1,a,"next"))},prev:function(a){var d=b.current;
d&&(q(a)||(a=d.direction.prev),b.jumpto(d.index-1,a,"prev"))},jumpto:function(a,d,e){var c=b.current;c&&(a=l(a),b.direction=d||c.direction[a>=c.index?"next":"prev"],b.router=e||"jumpto",c.loop&&(0>a&&(a=c.group.length+a%c.group.length),a%=c.group.length),c.group[a]!==v&&(b.cancel(),b._start(a)))},reposition:function(a,d){var e=b.current,c=e?e.wrap:null,k;c&&(k=b._getPosition(d),a&&"scroll"===a.type?(delete k.position,c.stop(!0,!0).animate(k,200)):(c.css(k),e.pos=f.extend({},e.dim,k)))},update:function(a){var d=
a&&a.type,e=!d||"orientationchange"===d;e&&(clearTimeout(B),B=null);b.isOpen&&!B&&(B=setTimeout(function(){var c=b.current;c&&!b.isClosing&&(b.wrap.removeClass("fancybox-tmp"),(e||"load"===d||"resize"===d&&c.autoResize)&&b._setDimension(),"scroll"===d&&c.canShrink||b.reposition(a),b.trigger("onUpdate"),B=null)},e&&!s?0:300))},toggle:function(a){b.isOpen&&(b.current.fitToView="boolean"===f.type(a)?a:!b.current.fitToView,s&&(b.wrap.removeAttr("style").addClass("fancybox-tmp"),b.trigger("onUpdate")),
b.update())},hideLoading:function(){p.unbind(".loading");f("#fancybox-loading").remove()},showLoading:function(){var a,d;b.hideLoading();a=f('<div id="fancybox-loading"><div></div></div>').click(b.cancel).appendTo("body");p.bind("keydown.loading",function(a){if(27===(a.which||a.keyCode))a.preventDefault(),b.cancel()});b.defaults.fixed||(d=b.getViewport(),a.css({position:"absolute",top:0.5*d.h+d.y,left:0.5*d.w+d.x}))},getViewport:function(){var a=b.current&&b.current.locked||!1,d={x:n.scrollLeft(),
y:n.scrollTop()};a?(d.w=a[0].clientWidth,d.h=a[0].clientHeight):(d.w=s&&r.innerWidth?r.innerWidth:n.width(),d.h=s&&r.innerHeight?r.innerHeight:n.height());return d},unbindEvents:function(){b.wrap&&t(b.wrap)&&b.wrap.unbind(".fb");p.unbind(".fb");n.unbind(".fb")},bindEvents:function(){var a=b.current,d;a&&(n.bind("orientationchange.fb"+(s?"":" resize.fb")+(a.autoCenter&&!a.locked?" scroll.fb":""),b.update),(d=a.keys)&&p.bind("keydown.fb",function(e){var c=e.which||e.keyCode,k=e.target||e.srcElement;
if(27===c&&b.coming)return!1;!e.ctrlKey&&(!e.altKey&&!e.shiftKey&&!e.metaKey&&(!k||!k.type&&!f(k).is("[contenteditable]")))&&f.each(d,function(d,k){if(1<a.group.length&&k[c]!==v)return b[d](k[c]),e.preventDefault(),!1;if(-1<f.inArray(c,k))return b[d](),e.preventDefault(),!1})}),f.fn.mousewheel&&a.mouseWheel&&b.wrap.bind("mousewheel.fb",function(d,c,k,g){for(var h=f(d.target||null),j=!1;h.length&&!j&&!h.is(".fancybox-skin")&&!h.is(".fancybox-wrap");)j=h[0]&&!(h[0].style.overflow&&"hidden"===h[0].style.overflow)&&
(h[0].clientWidth&&h[0].scrollWidth>h[0].clientWidth||h[0].clientHeight&&h[0].scrollHeight>h[0].clientHeight),h=f(h).parent();if(0!==c&&!j&&1<b.group.length&&!a.canShrink){if(0<g||0<k)b.prev(0<g?"down":"left");else if(0>g||0>k)b.next(0>g?"up":"right");d.preventDefault()}}))},trigger:function(a,d){var e,c=d||b.coming||b.current;if(c){f.isFunction(c[a])&&(e=c[a].apply(c,Array.prototype.slice.call(arguments,1)));if(!1===e)return!1;c.helpers&&f.each(c.helpers,function(d,e){if(e&&b.helpers[d]&&f.isFunction(b.helpers[d][a]))b.helpers[d][a](f.extend(!0,
{},b.helpers[d].defaults,e),c)});p.trigger(a)}},isImage:function(a){return q(a)&&a.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)},isSWF:function(a){return q(a)&&a.match(/\.(swf)((\?|#).*)?$/i)},_start:function(a){var d={},e,c;a=l(a);e=b.group[a]||null;if(!e)return!1;d=f.extend(!0,{},b.opts,e);e=d.margin;c=d.padding;"number"===f.type(e)&&(d.margin=[e,e,e,e]);"number"===f.type(c)&&(d.padding=[c,c,c,c]);d.modal&&f.extend(!0,d,{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1,
mouseWheel:!1,keys:null,helpers:{overlay:{closeClick:!1}}});d.autoSize&&(d.autoWidth=d.autoHeight=!0);"auto"===d.width&&(d.autoWidth=!0);"auto"===d.height&&(d.autoHeight=!0);d.group=b.group;d.index=a;b.coming=d;if(!1===b.trigger("beforeLoad"))b.coming=null;else{c=d.type;e=d.href;if(!c)return b.coming=null,b.current&&b.router&&"jumpto"!==b.router?(b.current.index=a,b[b.router](b.direction)):!1;b.isActive=!0;if("image"===c||"swf"===c)d.autoHeight=d.autoWidth=!1,d.scrolling="visible";"image"===c&&(d.aspectRatio=
!0);"iframe"===c&&s&&(d.scrolling="scroll");d.wrap=f(d.tpl.wrap).addClass("fancybox-"+(s?"mobile":"desktop")+" fancybox-type-"+c+" fancybox-tmp "+d.wrapCSS).appendTo(d.parent||"body");f.extend(d,{skin:f(".fancybox-skin",d.wrap),outer:f(".fancybox-outer",d.wrap),inner:f(".fancybox-inner",d.wrap)});f.each(["Top","Right","Bottom","Left"],function(a,b){d.skin.css("padding"+b,w(d.padding[a]))});b.trigger("onReady");if("inline"===c||"html"===c){if(!d.content||!d.content.length)return b._error("content")}else if(!e)return b._error("href");
"image"===c?b._loadImage():"ajax"===c?b._loadAjax():"iframe"===c?b._loadIframe():b._afterLoad()}},_error:function(a){f.extend(b.coming,{type:"html",autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrolling:"no",hasError:a,content:b.coming.tpl.error});b._afterLoad()},_loadImage:function(){var a=b.imgPreload=new Image;a.onload=function(){this.onload=this.onerror=null;b.coming.width=this.width/b.opts.pixelRatio;b.coming.height=this.height/b.opts.pixelRatio;b._afterLoad()};a.onerror=function(){this.onload=
this.onerror=null;b._error("image")};a.src=b.coming.href;!0!==a.complete&&b.showLoading()},_loadAjax:function(){var a=b.coming;b.showLoading();b.ajaxLoad=f.ajax(f.extend({},a.ajax,{url:a.href,error:function(a,e){b.coming&&"abort"!==e?b._error("ajax",a):b.hideLoading()},success:function(d,e){"success"===e&&(a.content=d,b._afterLoad())}}))},_loadIframe:function(){var a=b.coming,d=f(a.tpl.iframe.replace(/\{rnd\}/g,(new Date).getTime())).attr("scrolling",s?"auto":a.iframe.scrolling).attr("src",a.href);
f(a.wrap).bind("onReset",function(){try{f(this).find("iframe").hide().attr("src","//about:blank").end().empty()}catch(a){}});a.iframe.preload&&(b.showLoading(),d.one("load",function(){f(this).data("ready",1);s||f(this).bind("load.fb",b.update);f(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show();b._afterLoad()}));a.content=d.appendTo(a.inner);a.iframe.preload||b._afterLoad()},_preloadImages:function(){var a=b.group,d=b.current,e=a.length,c=d.preload?Math.min(d.preload,
e-1):0,f,g;for(g=1;g<=c;g+=1)f=a[(d.index+g)%e],"image"===f.type&&f.href&&((new Image).src=f.href)},_afterLoad:function(){var a=b.coming,d=b.current,e,c,k,g,h;b.hideLoading();if(a&&!1!==b.isActive)if(!1===b.trigger("afterLoad",a,d))a.wrap.stop(!0).trigger("onReset").remove(),b.coming=null;else{d&&(b.trigger("beforeChange",d),d.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove());b.unbindEvents();e=a.content;c=a.type;k=a.scrolling;f.extend(b,{wrap:a.wrap,skin:a.skin,
outer:a.outer,inner:a.inner,current:a,previous:d});g=a.href;switch(c){case "inline":case "ajax":case "html":a.selector?e=f("<div>").html(e).find(a.selector):t(e)&&(e.data("fancybox-placeholder")||e.data("fancybox-placeholder",f('<div class="fancybox-placeholder"></div>').insertAfter(e).hide()),e=e.show().detach(),a.wrap.bind("onReset",function(){f(this).find(e).length&&e.hide().replaceAll(e.data("fancybox-placeholder")).data("fancybox-placeholder",!1)}));break;case "image":e=a.tpl.image.replace("{href}",
g);break;case "swf":e='<object id="fancybox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="'+g+'"></param>',h="",f.each(a.swf,function(a,b){e+='<param name="'+a+'" value="'+b+'"></param>';h+=" "+a+'="'+b+'"'}),e+='<embed src="'+g+'" type="application/x-shockwave-flash" width="100%" height="100%"'+h+"></embed></object>"}(!t(e)||!e.parent().is(a.inner))&&a.inner.append(e);b.trigger("beforeShow");a.inner.css("overflow","yes"===k?"scroll":
"no"===k?"hidden":k);b._setDimension();b.reposition();b.isOpen=!1;b.coming=null;b.bindEvents();if(b.isOpened){if(d.prevMethod)b.transitions[d.prevMethod]()}else f(".fancybox-wrap").not(a.wrap).stop(!0).trigger("onReset").remove();b.transitions[b.isOpened?a.nextMethod:a.openMethod]();b._preloadImages()}},_setDimension:function(){var a=b.getViewport(),d=0,e=!1,c=!1,e=b.wrap,k=b.skin,g=b.inner,h=b.current,c=h.width,j=h.height,m=h.minWidth,u=h.minHeight,n=h.maxWidth,p=h.maxHeight,s=h.scrolling,q=h.scrollOutside?
h.scrollbarWidth:0,x=h.margin,y=l(x[1]+x[3]),r=l(x[0]+x[2]),v,z,t,C,A,F,B,D,H;e.add(k).add(g).width("auto").height("auto").removeClass("fancybox-tmp");x=l(k.outerWidth(!0)-k.width());v=l(k.outerHeight(!0)-k.height());z=y+x;t=r+v;C=E(c)?(a.w-z)*l(c)/100:c;A=E(j)?(a.h-t)*l(j)/100:j;if("iframe"===h.type){if(H=h.content,h.autoHeight&&1===H.data("ready"))try{H[0].contentWindow.document.location&&(g.width(C).height(9999),F=H.contents().find("body"),q&&F.css("overflow-x","hidden"),A=F.outerHeight(!0))}catch(G){}}else if(h.autoWidth||
h.autoHeight)g.addClass("fancybox-tmp"),h.autoWidth||g.width(C),h.autoHeight||g.height(A),h.autoWidth&&(C=g.width()),h.autoHeight&&(A=g.height()),g.removeClass("fancybox-tmp");c=l(C);j=l(A);D=C/A;m=l(E(m)?l(m,"w")-z:m);n=l(E(n)?l(n,"w")-z:n);u=l(E(u)?l(u,"h")-t:u);p=l(E(p)?l(p,"h")-t:p);F=n;B=p;h.fitToView&&(n=Math.min(a.w-z,n),p=Math.min(a.h-t,p));z=a.w-y;r=a.h-r;h.aspectRatio?(c>n&&(c=n,j=l(c/D)),j>p&&(j=p,c=l(j*D)),c<m&&(c=m,j=l(c/D)),j<u&&(j=u,c=l(j*D))):(c=Math.max(m,Math.min(c,n)),h.autoHeight&&
"iframe"!==h.type&&(g.width(c),j=g.height()),j=Math.max(u,Math.min(j,p)));if(h.fitToView)if(g.width(c).height(j),e.width(c+x),a=e.width(),y=e.height(),h.aspectRatio)for(;(a>z||y>r)&&(c>m&&j>u)&&!(19<d++);)j=Math.max(u,Math.min(p,j-10)),c=l(j*D),c<m&&(c=m,j=l(c/D)),c>n&&(c=n,j=l(c/D)),g.width(c).height(j),e.width(c+x),a=e.width(),y=e.height();else c=Math.max(m,Math.min(c,c-(a-z))),j=Math.max(u,Math.min(j,j-(y-r)));q&&("auto"===s&&j<A&&c+x+q<z)&&(c+=q);g.width(c).height(j);e.width(c+x);a=e.width();
y=e.height();e=(a>z||y>r)&&c>m&&j>u;c=h.aspectRatio?c<F&&j<B&&c<C&&j<A:(c<F||j<B)&&(c<C||j<A);f.extend(h,{dim:{width:w(a),height:w(y)},origWidth:C,origHeight:A,canShrink:e,canExpand:c,wPadding:x,hPadding:v,wrapSpace:y-k.outerHeight(!0),skinSpace:k.height()-j});!H&&(h.autoHeight&&j>u&&j<p&&!c)&&g.height("auto")},_getPosition:function(a){var d=b.current,e=b.getViewport(),c=d.margin,f=b.wrap.width()+c[1]+c[3],g=b.wrap.height()+c[0]+c[2],c={position:"absolute",top:c[0],left:c[3]};d.autoCenter&&d.fixed&&
!a&&g<=e.h&&f<=e.w?c.position="fixed":d.locked||(c.top+=e.y,c.left+=e.x);c.top=w(Math.max(c.top,c.top+(e.h-g)*d.topRatio));c.left=w(Math.max(c.left,c.left+(e.w-f)*d.leftRatio));return c},_afterZoomIn:function(){var a=b.current;a&&(b.isOpen=b.isOpened=!0,b.wrap.css("overflow","visible").addClass("fancybox-opened"),b.update(),(a.closeClick||a.nextClick&&1<b.group.length)&&b.inner.css("cursor","pointer").bind("click.fb",function(d){!f(d.target).is("a")&&!f(d.target).parent().is("a")&&(d.preventDefault(),
b[a.closeClick?"close":"next"]())}),a.closeBtn&&f(a.tpl.closeBtn).appendTo(b.skin).bind("click.fb",function(a){a.preventDefault();b.close()}),a.arrows&&1<b.group.length&&((a.loop||0<a.index)&&f(a.tpl.prev).appendTo(b.outer).bind("click.fb",b.prev),(a.loop||a.index<b.group.length-1)&&f(a.tpl.next).appendTo(b.outer).bind("click.fb",b.next)),b.trigger("afterShow"),!a.loop&&a.index===a.group.length-1?b.play(!1):b.opts.autoPlay&&!b.player.isActive&&(b.opts.autoPlay=!1,b.play()))},_afterZoomOut:function(a){a=
a||b.current;f(".fancybox-wrap").trigger("onReset").remove();f.extend(b,{group:{},opts:{},router:!1,current:null,isActive:!1,isOpened:!1,isOpen:!1,isClosing:!1,wrap:null,skin:null,outer:null,inner:null});b.trigger("afterClose",a)}});b.transitions={getOrigPosition:function(){var a=b.current,d=a.element,e=a.orig,c={},f=50,g=50,h=a.hPadding,j=a.wPadding,m=b.getViewport();!e&&(a.isDom&&d.is(":visible"))&&(e=d.find("img:first"),e.length||(e=d));t(e)?(c=e.offset(),e.is("img")&&(f=e.outerWidth(),g=e.outerHeight())):
(c.top=m.y+(m.h-g)*a.topRatio,c.left=m.x+(m.w-f)*a.leftRatio);if("fixed"===b.wrap.css("position")||a.locked)c.top-=m.y,c.left-=m.x;return c={top:w(c.top-h*a.topRatio),left:w(c.left-j*a.leftRatio),width:w(f+j),height:w(g+h)}},step:function(a,d){var e,c,f=d.prop;c=b.current;var g=c.wrapSpace,h=c.skinSpace;if("width"===f||"height"===f)e=d.end===d.start?1:(a-d.start)/(d.end-d.start),b.isClosing&&(e=1-e),c="width"===f?c.wPadding:c.hPadding,c=a-c,b.skin[f](l("width"===f?c:c-g*e)),b.inner[f](l("width"===
f?c:c-g*e-h*e))},zoomIn:function(){var a=b.current,d=a.pos,e=a.openEffect,c="elastic"===e,k=f.extend({opacity:1},d);delete k.position;c?(d=this.getOrigPosition(),a.openOpacity&&(d.opacity=0.1)):"fade"===e&&(d.opacity=0.1);b.wrap.css(d).animate(k,{duration:"none"===e?0:a.openSpeed,easing:a.openEasing,step:c?this.step:null,complete:b._afterZoomIn})},zoomOut:function(){var a=b.current,d=a.closeEffect,e="elastic"===d,c={opacity:0.1};e&&(c=this.getOrigPosition(),a.closeOpacity&&(c.opacity=0.1));b.wrap.animate(c,
{duration:"none"===d?0:a.closeSpeed,easing:a.closeEasing,step:e?this.step:null,complete:b._afterZoomOut})},changeIn:function(){var a=b.current,d=a.nextEffect,e=a.pos,c={opacity:1},f=b.direction,g;e.opacity=0.1;"elastic"===d&&(g="down"===f||"up"===f?"top":"left","down"===f||"right"===f?(e[g]=w(l(e[g])-200),c[g]="+=200px"):(e[g]=w(l(e[g])+200),c[g]="-=200px"));"none"===d?b._afterZoomIn():b.wrap.css(e).animate(c,{duration:a.nextSpeed,easing:a.nextEasing,complete:b._afterZoomIn})},changeOut:function(){var a=
b.previous,d=a.prevEffect,e={opacity:0.1},c=b.direction;"elastic"===d&&(e["down"===c||"up"===c?"top":"left"]=("up"===c||"left"===c?"-":"+")+"=200px");a.wrap.animate(e,{duration:"none"===d?0:a.prevSpeed,easing:a.prevEasing,complete:function(){f(this).trigger("onReset").remove()}})}};b.helpers.overlay={defaults:{closeClick:!0,speedOut:200,showEarly:!0,css:{},locked:!s,fixed:!0},overlay:null,fixed:!1,el:f("html"),create:function(a){a=f.extend({},this.defaults,a);this.overlay&&this.close();this.overlay=
f('<div class="fancybox-overlay"></div>').appendTo(b.coming?b.coming.parent:a.parent);this.fixed=!1;a.fixed&&b.defaults.fixed&&(this.overlay.addClass("fancybox-overlay-fixed"),this.fixed=!0)},open:function(a){var d=this;a=f.extend({},this.defaults,a);this.overlay?this.overlay.unbind(".overlay").width("auto").height("auto"):this.create(a);this.fixed||(n.bind("resize.overlay",f.proxy(this.update,this)),this.update());a.closeClick&&this.overlay.bind("click.overlay",function(a){if(f(a.target).hasClass("fancybox-overlay"))return b.isActive?
b.close():d.close(),!1});this.overlay.css(a.css).show()},close:function(){var a,b;n.unbind("resize.overlay");this.el.hasClass("fancybox-lock")&&(f(".fancybox-margin").removeClass("fancybox-margin"),a=n.scrollTop(),b=n.scrollLeft(),this.el.removeClass("fancybox-lock"),n.scrollTop(a).scrollLeft(b));f(".fancybox-overlay").remove().hide();f.extend(this,{overlay:null,fixed:!1})},update:function(){var a="100%",b;this.overlay.width(a).height("100%");I?(b=Math.max(G.documentElement.offsetWidth,G.body.offsetWidth),
p.width()>b&&(a=p.width())):p.width()>n.width()&&(a=p.width());this.overlay.width(a).height(p.height())},onReady:function(a,b){var e=this.overlay;f(".fancybox-overlay").stop(!0,!0);e||this.create(a);a.locked&&(this.fixed&&b.fixed)&&(e||(this.margin=p.height()>n.height()?f("html").css("margin-right").replace("px",""):!1),b.locked=this.overlay.append(b.wrap),b.fixed=!1);!0===a.showEarly&&this.beforeShow.apply(this,arguments)},beforeShow:function(a,b){var e,c;b.locked&&(!1!==this.margin&&(f("*").filter(function(){return"fixed"===
f(this).css("position")&&!f(this).hasClass("fancybox-overlay")&&!f(this).hasClass("fancybox-wrap")}).addClass("fancybox-margin"),this.el.addClass("fancybox-margin")),e=n.scrollTop(),c=n.scrollLeft(),this.el.addClass("fancybox-lock"),n.scrollTop(e).scrollLeft(c));this.open(a)},onUpdate:function(){this.fixed||this.update()},afterClose:function(a){this.overlay&&!b.coming&&this.overlay.fadeOut(a.speedOut,f.proxy(this.close,this))}};b.helpers.title={defaults:{type:"float",position:"bottom"},beforeShow:function(a){var d=
b.current,e=d.title,c=a.type;f.isFunction(e)&&(e=e.call(d.element,d));if(q(e)&&""!==f.trim(e)){d=f('<div class="fancybox-title fancybox-title-'+c+'-wrap">'+e+"</div>");switch(c){case "inside":c=b.skin;break;case "outside":c=b.wrap;break;case "over":c=b.inner;break;default:c=b.skin,d.appendTo("body"),I&&d.width(d.width()),d.wrapInner('<span class="child"></span>'),b.current.margin[2]+=Math.abs(l(d.css("margin-bottom")))}d["top"===a.position?"prependTo":"appendTo"](c)}}};f.fn.fancybox=function(a){var d,
e=f(this),c=this.selector||"",k=function(g){var h=f(this).blur(),j=d,k,l;!g.ctrlKey&&(!g.altKey&&!g.shiftKey&&!g.metaKey)&&!h.is(".fancybox-wrap")&&(k=a.groupAttr||"data-fancybox-group",l=h.attr(k),l||(k="rel",l=h.get(0)[k]),l&&(""!==l&&"nofollow"!==l)&&(h=c.length?f(c):e,h=h.filter("["+k+'="'+l+'"]'),j=h.index(this)),a.index=j,!1!==b.open(h,a)&&g.preventDefault())};a=a||{};d=a.index||0;!c||!1===a.live?e.unbind("click.fb-start").bind("click.fb-start",k):p.undelegate(c,"click.fb-start").delegate(c+
":not('.fancybox-item, .fancybox-nav')","click.fb-start",k);this.filter("[data-fancybox-start=1]").trigger("click");return this};p.ready(function(){var a,d;f.scrollbarWidth===v&&(f.scrollbarWidth=function(){var a=f('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo("body"),b=a.children(),b=b.innerWidth()-b.height(99).innerWidth();a.remove();return b});if(f.support.fixedPosition===v){a=f.support;d=f('<div style="position:fixed;top:20px;"></div>').appendTo("body");var e=20===
d[0].offsetTop||15===d[0].offsetTop;d.remove();a.fixedPosition=e}f.extend(b.defaults,{scrollbarWidth:f.scrollbarWidth(),fixed:f.support.fixedPosition,parent:f("body")});a=f(r).width();J.addClass("fancybox-lock-test");d=f(r).width();J.removeClass("fancybox-lock-test");f("<style type='text/css'>.fancybox-margin{margin-right:"+(d-a)+"px;}</style>").appendTo("head")})})(window,document,jQuery);

View File

@ -1 +0,0 @@
(function(){var g={jQuery:"http://code.jquery.com/jquery-latest.min.js"};var j=function(){(function(k){k.fn.idTabs=function(){var n={};for(var m=0;m<arguments.length;++m){var l=arguments[m];switch(l.constructor){case Object:k.extend(n,l);break;case Boolean:n.change=l;break;case Number:n.start=l;break;case Function:n.click=l;break;case String:if(l.charAt(0)=="."){n.selected=l}else{if(l.charAt(0)=="!"){n.event=l}else{n.start=l}}break}}if(typeof n["return"]=="function"){n.change=n["return"]}return this.each(function(){k.idTabs(this,n)})};k.idTabs=function(n,m){var q=(k.metadata)?k(n).metadata():{};var o=k.extend({},k.idTabs.settings,q,m);if(o.selected.charAt(0)=="."){o.selected=o.selected.substr(1)}if(o.event.charAt(0)=="!"){o.event=o.event.substr(1)}if(o.start==null){o.start=-1}var l=function(){if(k(this).is("."+o.selected)){return o.change}var u="#"+this.href.split("#")[1];var s=[];var t=[];k("a",n).each(function(){if(this.href.match(/#/)){s.push(this);t.push("#"+this.href.split("#")[1])}});if(o.click&&!o.click.apply(this,[u,t,n,o])){return o.change}for(i in s){k(s[i]).removeClass(o.selected)}for(i in t){k(t[i]).hide()}k(this).addClass(o.selected);k(u).show();return o.change};var p=k("a[href*='#']",n).unbind(o.event,l).bind(o.event,l);p.each(function(){k("#"+this.href.split("#")[1]).hide()});var r=false;if((r=p.filter("."+o.selected)).length){}else{if(typeof o.start=="number"&&(r=p.eq(o.start)).length){}else{if(typeof o.start=="string"&&(r=p.filter("[href*='#"+o.start+"']")).length){}}}if(r){r.removeClass(o.selected);r.trigger(o.event)}return o};k.idTabs.settings={start:0,change:false,click:null,selected:".selected",event:"!click"};k.idTabs.version="2.2";k(function(){k(".idTabs").idTabs()})})(jQuery)};var a=function(l,k){k=k.split(".");while(l&&k.length){l=l[k.shift()]}return l};var c=document.getElementsByTagName("head")[0];var f=function(k){var l=document.createElement("script");l.type="text/javascript";l.src=k;c.appendChild(l)};var e=document.getElementsByTagName("script");var h=e[e.length-1].src;var b=true;for(d in g){if(a(this,d)){continue}b=false;f(g[d])}if(b){return j()}f(h)})();

View File

@ -1,665 +0,0 @@
// ----------------------------------------------------------------------------
// markItUp! Universal MarkUp Engine, JQuery plugin
// v 1.1.x
// Dual licensed under the MIT and GPL licenses.
// ----------------------------------------------------------------------------
// Copyright (C) 2007-2012 Jay Salvat
// http://markitup.jaysalvat.com/
// ----------------------------------------------------------------------------
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// ----------------------------------------------------------------------------
(function($) {
$.fn.markItUp = function(settings, extraSettings) {
var method, params, options, ctrlKey, shiftKey, altKey; ctrlKey = shiftKey = altKey = false;
if (typeof settings == 'string') {
method = settings;
params = extraSettings;
}
options = { id: '',
nameSpace: '',
root: '',
previewHandler: false,
previewInWindow: '', // 'width=800, height=600, resizable=yes, scrollbars=yes'
previewInElement: '',
previewAutoRefresh: true,
previewPosition: 'after',
previewTemplatePath: chrome.extension.getURL('/includes/preview.html'),
previewParser: false,
previewParserPath: '',
previewParserVar: 'data',
resizeHandle: true,
beforeInsert: '',
afterInsert: '',
onEnter: {},
onShiftEnter: {},
onCtrlEnter: {},
onTab: {},
markupSet: [ { /* set */ } ]
};
$.extend(options, settings, extraSettings);
// compute markItUp! path
if (!options.root) {
$('script').each(function(a, tag) {
miuScript = $(tag).get(0).src.match(/(.*)jquery\.markitup(\.pack)?\.js$/);
if (miuScript !== null) {
options.root = miuScript[1];
}
});
}
// Quick patch to keep compatibility with jQuery 1.9
var uaMatch = function(ua) {
ua = ua.toLowerCase();
var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
/(webkit)[ \/]([\w.]+)/.exec(ua) ||
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
/(msie) ([\w.]+)/.exec(ua) ||
ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
[];
return {
browser: match[ 1 ] || "",
version: match[ 2 ] || "0"
};
};
var matched = uaMatch( navigator.userAgent );
var browser = {};
if (matched.browser) {
browser[matched.browser] = true;
browser.version = matched.version;
}
if (browser.chrome) {
browser.webkit = true;
} else if (browser.webkit) {
browser.safari = true;
}
return this.each(function() {
var $$, textarea, levels, scrollPosition, caretPosition, caretOffset,
clicked, hash, header, footer, previewWindow, template, iFrame, abort;
$$ = $(this);
textarea = this;
levels = [];
abort = false;
scrollPosition = caretPosition = 0;
caretOffset = -1;
options.previewParserPath = localize(options.previewParserPath);
options.previewTemplatePath = localize(options.previewTemplatePath);
if (method) {
switch(method) {
case 'remove':
remove();
break;
case 'insert':
markup(params);
break;
default:
$.error('Method ' + method + ' does not exist on jQuery.markItUp');
}
return;
}
// apply the computed path to ~/
function localize(data, inText) {
if (inText) {
return data.replace(/("|')~\//g, "$1"+options.root);
}
return data.replace(/^~\//, options.root);
}
// init and build editor
function init() {
id = ''; nameSpace = '';
if (options.id) {
id = 'id="'+options.id+'"';
} else if ($$.attr("id")) {
id = 'id="markItUp'+($$.attr("id").substr(0, 1).toUpperCase())+($$.attr("id").substr(1))+'"';
}
if (options.nameSpace) {
nameSpace = 'class="'+options.nameSpace+'"';
}
$$.wrap('<div '+nameSpace+'></div>');
$$.wrap('<div '+id+' class="markItUp"></div>');
$$.wrap('<div class="markItUpContainer"></div>');
$$.addClass("markItUpEditor");
// add the header before the textarea
header = $('<div class="markItUpHeader"></div>').insertBefore($$);
$(dropMenus(options.markupSet)).appendTo(header);
// add the footer after the textarea
footer = $('<div class="markItUpFooter"></div>').insertAfter($$);
// add the resize handle after textarea
if (options.resizeHandle === true && browser.safari !== true) {
resizeHandle = $('<div class="markItUpResizeHandle"></div>')
.insertAfter($$)
.bind("mousedown.markItUp", function(e) {
var h = $$.height(), y = e.clientY, mouseMove, mouseUp;
mouseMove = function(e) {
$$.css("height", Math.max(20, e.clientY+h-y)+"px");
return false;
};
mouseUp = function(e) {
$("html").unbind("mousemove.markItUp", mouseMove).unbind("mouseup.markItUp", mouseUp);
return false;
};
$("html").bind("mousemove.markItUp", mouseMove).bind("mouseup.markItUp", mouseUp);
});
footer.append(resizeHandle);
}
// listen key events
$$.bind('keydown.markItUp', keyPressed).bind('keyup', keyPressed);
// bind an event to catch external calls
$$.bind("insertion.markItUp", function(e, settings) {
if (settings.target !== false) {
get();
}
if (textarea === $.markItUp.focused) {
markup(settings);
}
});
// remember the last focus
$$.bind('focus.markItUp', function() {
$.markItUp.focused = this;
});
if (options.previewInElement) {
refreshPreview();
}
}
// recursively build header with dropMenus from markupset
function dropMenus(markupSet) {
var ul = $('<ul></ul>'), i = 0;
$('li:hover > ul', ul).css('display', 'block');
$.each(markupSet, function() {
var button = this, t = '', title, li, j;
title = (button.key) ? (button.name||'')+' [Ctrl+'+button.key+']' : (button.name||'');
key = (button.key) ? 'accesskey="'+button.key+'"' : '';
if (button.separator) {
li = $('<li class="markItUpSeparator">'+(button.separator||'')+'</li>').appendTo(ul);
} else {
i++;
for (j = levels.length -1; j >= 0; j--) {
t += levels[j]+"-";
}
li = $('<li class="markItUpButton markItUpButton'+t+(i)+' '+(button.className||'')+'"><a href="" '+key+' title="'+title+'">'+(button.name||'')+'</a></li>')
.bind("contextmenu.markItUp", function() { // prevent contextmenu on mac and allow ctrl+click
return false;
}).bind('click.markItUp', function(e) {
e.preventDefault();
}).bind("focusin.markItUp", function(){
$$.focus();
}).bind('mouseup', function() {
if (button.call) {
eval(button.call)();
}
setTimeout(function() { markup(button) },1);
return false;
}).bind('mouseenter.markItUp', function() {
$('> ul', this).show();
$(document).one('click', function() { // close dropmenu if click outside
$('ul ul', header).hide();
}
);
}).bind('mouseleave.markItUp', function() {
$('> ul', this).hide();
}).appendTo(ul);
if (button.dropMenu) {
levels.push(i);
$(li).addClass('markItUpDropMenu').append(dropMenus(button.dropMenu));
}
}
});
levels.pop();
return ul;
}
// markItUp! markups
function magicMarkups(string) {
if (string) {
string = string.toString();
string = string.replace(/\(\!\(([\s\S]*?)\)\!\)/g,
function(x, a) {
var b = a.split('|!|');
if (altKey === true) {
return (b[1] !== undefined) ? b[1] : b[0];
} else {
return (b[1] === undefined) ? "" : b[0];
}
}
);
// [![prompt]!], [![prompt:!:value]!]
string = string.replace(/\[\!\[([\s\S]*?)\]\!\]/g,
function(x, a) {
var b = a.split(':!:');
if (abort === true) {
return false;
}
value = prompt(b[0], (b[1]) ? b[1] : '');
if (value === null) {
abort = true;
}
return value;
}
);
return string;
}
return "";
}
// prepare action
function prepare(action) {
if ($.isFunction(action)) {
action = action(hash);
}
return magicMarkups(action);
}
// build block to insert
function build(string) {
var openWith = prepare(clicked.openWith);
var placeHolder = prepare(clicked.placeHolder);
var replaceWith = prepare(clicked.replaceWith);
var closeWith = prepare(clicked.closeWith);
var openBlockWith = prepare(clicked.openBlockWith);
var closeBlockWith = prepare(clicked.closeBlockWith);
var multiline = clicked.multiline;
if (replaceWith !== "") {
block = openWith + replaceWith + closeWith;
} else if (selection === '' && placeHolder !== '') {
block = openWith + placeHolder + closeWith;
} else {
string = string || selection;
var lines = [string], blocks = [];
if (multiline === true) {
lines = string.split(/\r?\n/);
}
for (var l = 0; l < lines.length; l++) {
line = lines[l];
var trailingSpaces;
if (trailingSpaces = line.match(/ *$/)) {
blocks.push(openWith + line.replace(/ *$/g, '') + closeWith + trailingSpaces);
} else {
blocks.push(openWith + line + closeWith);
}
}
block = blocks.join("\n");
}
block = openBlockWith + block + closeBlockWith;
return { block:block,
openBlockWith:openBlockWith,
openWith:openWith,
replaceWith:replaceWith,
placeHolder:placeHolder,
closeWith:closeWith,
closeBlockWith:closeBlockWith
};
}
// define markup to insert
function markup(button) {
var len, j, n, i;
hash = clicked = button;
get();
$.extend(hash, { line:"",
root:options.root,
textarea:textarea,
selection:(selection||''),
caretPosition:caretPosition,
ctrlKey:ctrlKey,
shiftKey:shiftKey,
altKey:altKey
}
);
// callbacks before insertion
prepare(options.beforeInsert);
prepare(clicked.beforeInsert);
if ((ctrlKey === true && shiftKey === true) || button.multiline === true) {
prepare(clicked.beforeMultiInsert);
}
$.extend(hash, { line:1 });
if ((ctrlKey === true && shiftKey === true)) {
lines = selection.split(/\r?\n/);
for (j = 0, n = lines.length, i = 0; i < n; i++) {
if ($.trim(lines[i]) !== '') {
$.extend(hash, { line:++j, selection:lines[i] } );
lines[i] = build(lines[i]).block;
} else {
lines[i] = "";
}
}
string = { block:lines.join('\n')};
start = caretPosition;
len = string.block.length + ((browser.opera) ? n-1 : 0);
} else if (ctrlKey === true) {
string = build(selection);
start = caretPosition + string.openWith.length;
len = string.block.length - string.openWith.length - string.closeWith.length;
len = len - (string.block.match(/ $/) ? 1 : 0);
len -= fixIeBug(string.block);
} else if (shiftKey === true) {
string = build(selection);
start = caretPosition;
len = string.block.length;
len -= fixIeBug(string.block);
} else {
string = build(selection);
start = caretPosition + string.block.length ;
len = 0;
start -= fixIeBug(string.block);
}
if ((selection === '' && string.replaceWith === '')) {
caretOffset += fixOperaBug(string.block);
start = caretPosition + string.openBlockWith.length + string.openWith.length;
len = string.block.length - string.openBlockWith.length - string.openWith.length - string.closeWith.length - string.closeBlockWith.length;
caretOffset = $$.val().substring(caretPosition, $$.val().length).length;
caretOffset -= fixOperaBug($$.val().substring(0, caretPosition));
}
$.extend(hash, { caretPosition:caretPosition, scrollPosition:scrollPosition } );
if (string.block !== selection && abort === false) {
insert(string.block);
set(start, len);
} else {
caretOffset = -1;
}
get();
$.extend(hash, { line:'', selection:selection });
// callbacks after insertion
if ((ctrlKey === true && shiftKey === true) || button.multiline === true) {
prepare(clicked.afterMultiInsert);
}
prepare(clicked.afterInsert);
prepare(options.afterInsert);
// refresh preview if opened
if (previewWindow && options.previewAutoRefresh) {
refreshPreview();
}
// reinit keyevent
shiftKey = altKey = ctrlKey = abort = false;
}
// Substract linefeed in Opera
function fixOperaBug(string) {
if (browser.opera) {
return string.length - string.replace(/\n*/g, '').length;
}
return 0;
}
// Substract linefeed in IE
function fixIeBug(string) {
if (browser.msie) {
return string.length - string.replace(/\r*/g, '').length;
}
return 0;
}
// add markup
function insert(block) {
if (document.selection) {
var newSelection = document.selection.createRange();
newSelection.text = block;
} else {
textarea.value = textarea.value.substring(0, caretPosition) + block + textarea.value.substring(caretPosition + selection.length, textarea.value.length);
}
}
// set a selection
function set(start, len) {
if (textarea.createTextRange){
// quick fix to make it work on Opera 9.5
if (browser.opera && browser.version >= 9.5 && len == 0) {
return false;
}
range = textarea.createTextRange();
range.collapse(true);
range.moveStart('character', start);
range.moveEnd('character', len);
range.select();
} else if (textarea.setSelectionRange ){
textarea.setSelectionRange(start, start + len);
}
textarea.scrollTop = scrollPosition;
textarea.focus();
}
// get the selection
function get() {
textarea.focus();
scrollPosition = textarea.scrollTop;
if (document.selection) {
selection = document.selection.createRange().text;
if (browser.msie) { // ie
var range = document.selection.createRange(), rangeCopy = range.duplicate();
rangeCopy.moveToElementText(textarea);
caretPosition = -1;
while(rangeCopy.inRange(range)) {
rangeCopy.moveStart('character');
caretPosition ++;
}
} else { // opera
caretPosition = textarea.selectionStart;
}
} else { // gecko & webkit
caretPosition = textarea.selectionStart;
selection = textarea.value.substring(caretPosition, textarea.selectionEnd);
}
return selection;
}
// open preview window
function preview() {
if (typeof options.previewHandler === 'function') {
previewWindow = true;
} else if (options.previewInElement) {
previewWindow = $(options.previewInElement);
} else if (!previewWindow || previewWindow.closed) {
if (options.previewInWindow) {
previewWindow = window.open('', 'preview', options.previewInWindow);
$(window).unload(function() {
previewWindow.close();
});
} else {
iFrame = $('<iframe class="markItUpPreviewFrame"></iframe>');
if (options.previewPosition == 'after') {
iFrame.insertAfter(footer);
} else {
iFrame.insertBefore(header);
}
previewWindow = iFrame[iFrame.length - 1].contentWindow || frame[iFrame.length - 1];
}
} else if (altKey === true) {
if (iFrame) {
iFrame.remove();
} else {
previewWindow.close();
}
previewWindow = iFrame = false;
}
if (!options.previewAutoRefresh) {
refreshPreview();
}
if (options.previewInWindow) {
previewWindow.focus();
}
}
// refresh Preview window
function refreshPreview() {
renderPreview();
}
function renderPreview() {
var phtml;
if (options.previewHandler && typeof options.previewHandler === 'function') {
options.previewHandler( $$.val() );
} else if (options.previewParser && typeof options.previewParser === 'function') {
var data = options.previewParser( $$.val() );
writeInPreview(localize(data, 1) );
} else if (options.previewParserPath !== '') {
$.ajax({
type: 'POST',
dataType: 'text',
global: false,
url: options.previewParserPath,
data: options.previewParserVar+'='+encodeURIComponent($$.val()),
success: function(data) {
writeInPreview( localize(data, 1) );
}
});
} else {
if (!template) {
$.ajax({
url: options.previewTemplatePath,
dataType: 'text',
global: false,
success: function(data) {
writeInPreview( localize(data, 1).replace(/<!-- content -->/g, $$.val()) );
}
});
}
}
return false;
}
function writeInPreview(data) {
if (options.previewInElement) {
$(options.previewInElement).html(data);
} else if (previewWindow && previewWindow.document) {
try {
sp = previewWindow.document.documentElement.scrollTop
} catch(e) {
sp = 0;
}
previewWindow.document.open();
previewWindow.document.write(data);
previewWindow.document.close();
previewWindow.document.documentElement.scrollTop = sp;
}
}
// set keys pressed
function keyPressed(e) {
shiftKey = e.shiftKey;
altKey = e.altKey;
ctrlKey = (!(e.altKey && e.ctrlKey)) ? (e.ctrlKey || e.metaKey) : false;
if (e.type === 'keydown') {
if (ctrlKey === true) {
li = $('a[accesskey="'+((e.keyCode == 13) ? '\\n' : String.fromCharCode(e.keyCode))+'"]', header).parent('li');
if (li.length !== 0) {
ctrlKey = false;
setTimeout(function() {
li.triggerHandler('mouseup');
},1);
return false;
}
}
if (e.keyCode === 13 || e.keyCode === 10) { // Enter key
if (ctrlKey === true) { // Enter + Ctrl
ctrlKey = false;
markup(options.onCtrlEnter);
return options.onCtrlEnter.keepDefault;
} else if (shiftKey === true) { // Enter + Shift
shiftKey = false;
markup(options.onShiftEnter);
return options.onShiftEnter.keepDefault;
} else { // only Enter
markup(options.onEnter);
return options.onEnter.keepDefault;
}
}
if (e.keyCode === 9) { // Tab key
if (shiftKey == true || ctrlKey == true || altKey == true) {
return false;
}
if (caretOffset !== -1) {
get();
caretOffset = $$.val().length - caretOffset;
set(caretOffset, 0);
caretOffset = -1;
return false;
} else {
markup(options.onTab);
return options.onTab.keepDefault;
}
}
}
}
function remove() {
$$.unbind(".markItUp").removeClass('markItUpEditor');
$$.parent('div').parent('div.markItUp').parent('div').replaceWith($$);
$$.data('markItUp', null);
}
init();
});
};
$.fn.markItUpRemove = function() {
return this.each(function() {
$(this).markItUp('remove');
}
);
};
$.markItUp = function(settings) {
var options = { target:false };
$.extend(options, settings);
if (options.target) {
return $(options.target).each(function() {
$(this).focus();
$(this).trigger('insertion', [options]);
});
} else {
$('textarea').trigger('insertion', [options]);
}
};
})(jQuery);

View File

@ -0,0 +1,20 @@
function MessageSender() {}
function stub() {}
MessageSender.prototype.css = function(files, callback) {
this.sendMessage({
type: 'injectCSSFiles',
files: files
}, callback || stub);
};
MessageSender.prototype.js = function(files, callback) {
this.sendMessage({
type: 'executeJSFiles',
files: files
}, callback || stub);
};
MessageSender.prototype.sendMessage = function() {
chrome.runtime.sendMessage.apply(chrome.runtime, arguments);
};

View File

@ -0,0 +1,37 @@
/**
* Объект для получения опций
* @constructor {OptionsManager}
* @param {Object} options Хеш настроек
*/
function OptionsManager(options) {
this._options = options || {};
}
/**
* @param {String} optionName Имя опции
* @returns {Boolean|String|Null} Значение опции
*/
OptionsManager.prototype.get = function(optionName) {
return this._options.hasOwnProperty(optionName) ? this._options[optionName].value : null;
};
/**
* Проверяет, равна ли опция значению value. Если value не переданно, проверяет задана ли она и не равна ли false/''
* @param {String} optionName Имя опции
* @param {Boolean|String} [value=true] Значение опции
* @returns {Boolean}
*/
OptionsManager.prototype.is = function(optionName, value) {
if (typeof value !== 'undefined') {
return this.get(optionName) === value;
} else {
return Boolean(this.get(optionName));
}
};
/**
* @returns {Object} Хеш опций
*/
OptionsManager.prototype.getOptions = function() {
return this._options;
};

View File

@ -1,203 +1,242 @@
var ppOptions = [
// Fancybox
'option_fancybox', 'option_fancybox_images', 'option_fancybox_videos', 'option_fancybox_posts',
// CTRL+Enter
'option_ctrl_enter',
// Load original images
'option_images_load_original',
// Fluid layout
'option_fluid_layout',
// Visual editor for posts
'option_visual_editor_post',
// Google search
'option_search_with_google',
// WebSocket
'option_ws',
// Comments
'option_ws_comments', 'option_ws_comments_color_fadeout', 'option_ws_comments_notifications',
// Feeds
'option_ws_feeds', 'option_ws_feeds_subscriptions', 'option_ws_feeds_blogs',
// Font size
'option_enlarge_font', 'option_enlarge_font_size',
// @ before username
'option_at_before_username'
];
/**
* Объект, управляющий сохранением настроек на странице настроек
*
* При создании сохраняет версию, восстанавливает настройки, слушает изменения на инпутах.
* @constructor
*/
function OptionsPage() {
this.form = document.querySelector('form');
// Saves options to localStorage.
function pp_save_options() {
// CTRL+Enter
var option_ctrl_enter = document.getElementById('option-ctrl-enter');
// Fancybox
//
var option_fancybox = document.getElementById('option-fancybox');
// Images
var option_fancybox_images = document.getElementById('option-fancybox-images');
// Videos
var option_fancybox_videos = document.getElementById('option-fancybox-videos');
// Posts
var option_fancybox_posts = document.getElementById('option-fancybox-posts');
// Fluid layout
var option_fluid_layout = document.getElementById('option-layout-fluid');
// Load original images
var option_images_load_original = document.getElementById('option-images-load-original');
// Visual editor for posts
var option_visual_editor_post = document.getElementById('option-visual-editor-post');
// Google search
var checkbox_search_with_google = document.getElementById('option-search-with-google');
// WebSocket
//
var option_ws = document.getElementById('option-ws');
// Comments
var option_ws_comments = document.getElementById('option-ws-comments');
// Fade out highlight comments
var option_ws_comments_color_fadeout = document.getElementById('option-ws-comments-color-fadeout');
// Comments desktop notifications
var option_ws_comments_notifications = document.getElementById('option-ws-comments-notifications');
// Feeds
var option_ws_feeds = document.getElementById('option-ws-feeds');
// Subscriptions
var option_ws_feeds_subscriptions = document.getElementById('option-ws-feeds-subscriptions');
// Blogs
var option_ws_feeds_blogs = document.getElementById('option-ws-feeds-blogs');
// Font size
var option_enlarge_font = document.getElementById('option-enlarge-font');
// Size ratio
var option_enlarge_font_size = document.querySelector('input[name="pp-font-size"]:checked');
// @ before username
var option_at_before_username = document.getElementById('option-at-before-username');
this.listenTabs();
chrome.runtime.sendMessage(null, {
type: 'getManifestVersion'
}, null, function(response) {
this.version = response.version || 'undefined';
this.showVersion();
this.restore();
this.form.addEventListener('change', this._onChange.bind(this));
}.bind(this));
}
/**
* Получает версию настроек. Если она не равна версии приложения, записывает в сторедж плагина настройки из инпутов
* и версию приложения.
*/
OptionsPage.prototype.updateOptionsFromFrom = function() {
chrome.storage.sync.get('options_version', function(data) {
this.logVersion(data.options_version);
if (data.options_version !== this.version) {
console.log('Initializing options...');
Array.prototype.forEach.call(this.form.elements, this.updateOptionFromInput.bind(this));
// Saving parameters
chrome.storage.sync.set({
'option_ctrl_enter': option_ctrl_enter.checked,
'option_fancybox': option_fancybox.checked,
'option_fancybox_images': option_fancybox_images.checked,
'option_fancybox_videos': option_fancybox_videos.checked,
'option_fancybox_posts': option_fancybox_posts.checked,
'option_fluid_layout': option_fluid_layout.checked,
'option_images_load_original': option_images_load_original.checked,
'option_visual_editor_post': option_visual_editor_post.checked,
'option_search_with_google': checkbox_search_with_google.checked,
'option_ws': option_ws.checked,
'option_ws_comments': option_ws_comments.checked,
'option_ws_comments_color_fadeout': option_ws_comments_color_fadeout.checked,
'option_ws_comments_notifications': option_ws_comments_notifications.checked,
'option_ws_feeds': option_ws_feeds.checked,
'option_ws_feeds_subscriptions': option_ws_feeds_subscriptions.checked,
'option_ws_feeds_blogs': option_ws_feeds_blogs.checked,
'option_enlarge_font': option_enlarge_font.checked,
'option_enlarge_font_size': option_enlarge_font_size.value,
'option_at_before_username': option_at_before_username.checked
options: this.getValues(),
options_version: this.version
}, function() {
// Update status to let user know options were saved.
var status = document.getElementById('status');
status.innerHTML = 'Options Saved.';
setTimeout(function() {
console.log('Default options initialized. Version upgraded to %s.', this.version);
/* global confirm */
if (! confirm(chrome.i18n.getMessage('options_text_new_version'))) {
window.close();
}, 1500);
}
});
}
}
}.bind(this));
};
// Restores select box state to saved value from localStorage.
function pp_restore_options() {
// Loading options
chrome.storage.sync.get(ppOptions, function(options) {
// CTRL+Enter
if (options.option_ctrl_enter == true) {
document.getElementById('option-ctrl-enter').checked = true;
/**
* Сохраняет настройки
*/
OptionsPage.prototype.save = function() {
var ppOptions = this.getValues();
console.log('Saving options: %O', ppOptions);
chrome.storage.sync.set({ options: ppOptions }, this.updateStatus.bind(this));
};
/**
* Получает настройки из стореджа плагина, устанавливает соответствующим инпутам соответствующие значения.
*/
OptionsPage.prototype.restore = function() {
this.checkOldStyle();
chrome.storage.sync.get('options', function(data) {
this._options = data.options || {};
// Setting options in DOM
Object.keys(this._options).forEach(function(key) {
var data = this._options[key],
input = this.form.elements[this.getOptionName(key)];
if (input) {
switch (data.type) {
case 'boolean':
input.checked = data.value;
break;
case 'enum':
case 'plain':
input.value = data.value;
break;
default:
console.warn('Invalid option "%s" type: %O', key, data);
break;
}
// Fancybox
//
if (options.option_fancybox == true) {
document.getElementById('option-fancybox').checked = true;
}
// Images
if (options.option_fancybox_images == true) {
document.getElementById('option-fancybox-images').checked = true;
}.bind(this));
this.updateOptionsFromFrom();
}.bind(this));
};
/**
* @returns {Object} Хеш настроек вида { имяастроки: значениеастройки }
*/
OptionsPage.prototype.getValues = function() {
return this._options;
};
/**
* @param {Event} event Событие изменения
*/
OptionsPage.prototype._onChange = function(event) {
this.updateOptionFromInput(event.target);
this.save();
};
OptionsPage.prototype.updateOptionFromInput = function(input) {
var key = this.getOptionKey(input.name);
if (this.isBoolean(input)) {
this._options[key] = {
type: 'boolean',
value: input.checked
};
} else if (this.isEnum(input)) {
this._options[key] = {
type: 'enum',
value: input.value
};
} else {
this._options[key] = {
type: 'plain',
value: input.value
};
}
// Videos
if (options.option_fancybox_videos == true) {
document.getElementById('option-fancybox-videos').checked = true;
};
/**
* @param {HTMLElement} option Элемент опции
* @returns {Boolean} Является ли настройка булевой
*/
OptionsPage.prototype.isBoolean = function(option) {
return option.getAttribute('type') === 'checkbox';
};
/**
*
* @param {HTMLElement} option Элемент опции
* @returns {Boolean} Является ли настройка енумом
*/
OptionsPage.prototype.isEnum = function(option) {
return option.getAttribute('type') === 'radio';
};
/**
* @param {String} name Имя инпута
* @returns {String} Ключ для хеша настроек
*/
OptionsPage.prototype.getOptionKey = function(name) {
return name.replace(/-/g, '_');
};
/**
* @param {String} Ключ хеша настроек
* @returns {String} Имя инпута
*/
OptionsPage.prototype.getOptionName = function(key) {
return key.replace(/_/g, '-');
};
/**
* Выводит в консоль версию настроек и версию плагина
* @param {String} optionsVersion
*/
OptionsPage.prototype.logVersion = function(optionsVersion) {
console.info('Point+ %s, local options are for %s', this.version, optionsVersion);
};
/**
* Добавляет номер версии в подвал
*/
OptionsPage.prototype.showVersion = function() {
document.querySelector('#version').innerHTML = this.version;
};
/**
* Проверяет, не старого ли формата настройки. И если старого, то удаляет их.
*/
OptionsPage.prototype.checkOldStyle = function() {
chrome.storage.sync.get('option_fancybox', function(data) {
if ((data.option_fancybox === true) || (data.option_fancybox === false)) {
console.log('Found old-style options. Cleaning...');
chrome.storage.sync.get(null, function(data) {
var option;
console.log('Old data: %O', data);
for (option in data) {
if (data.hasOwnProperty(option)) {
chrome.storage.sync.remove(option);
}
// Posts
if (options.option_fancybox_posts == true) {
document.getElementById('option-fancybox-posts').checked = true;
}
// Fluid layout
if (options.option_fluid_layout == true) {
document.getElementById('option-layout-fluid').checked = true;
}
// Load original images
if (options.option_images_load_original == true) {
document.getElementById('option-images-load-original').checked = true;
}
// Visual editor for posts
if (options.option_visual_editor_post == true) {
document.getElementById('option-visual-editor-post').checked = true;
}
// Google search
if (options.option_search_with_google == true) {
document.getElementById('option-search-with-google').checked = true;
}
// WebSocket
//
if (options.option_ws == true) {
document.getElementById('option-ws').checked = true;
}
// Comments
if (options.option_ws_comments == true) {
document.getElementById('option-ws-comments').checked = true;
}
// Fade out highlight comments
if (options.option_ws_comments_color_fadeout == true) {
document.getElementById('option-ws-comments-color-fadeout').checked = true;
}
// Comments desktop notifications
// Disabling for Opera
if (/OPR/.test(navigator.userAgent)) {
document.getElementById('option-ws-comments-notifications').setAttribute('disabled', 'disabled');
}
if (options.option_ws_comments_notifications == true) {
document.getElementById('option-ws-comments-notifications').checked = true;
}
// Feeds
if (options.option_ws_feeds == true) {
document.getElementById('option-ws-feeds').checked = true;
}
// Subscriptions
if (options.option_ws_feeds_subscriptions == true) {
document.getElementById('option-ws-feeds-subscriptions').checked = true;
}
// Blogs
if (options.option_ws_feeds_blogs == true) {
document.getElementById('option-ws-feeds-blogs').checked = true;
}
// Font size
if (options.option_enlarge_font == true) {
document.getElementById('option-enlarge-font').checked = true;
}
// Size ratio
if (options.option_enlarge_font_size !== undefined) {
document.getElementById('option-enlarge-font-' + options.option_enlarge_font_size).checked = true;
}
// @ before username
if (options.option_at_before_username == true) {
document.getElementById('option-at-before-username').checked = true;
}
// Showing version
document.getElementById('pp-version').innerHTML = 'Point+ ' + getVersion() + ' by <a href="http://skobkin-ru.point.im/" target="_blank">@skobkin-ru</a>';
console.log('All old data removed');
});
}
});
};
/**
* Показывает плашку про то, что настройки сохранились и надо обновить страницу
*/
OptionsPage.prototype.updateStatus = function() {
this.status = this.status || document.querySelector('.saved');
}
document.addEventListener('DOMContentLoaded', pp_restore_options);
document.querySelector('#save').addEventListener('click', pp_save_options);
this.status.classList.remove('hidden');
};
// Getting version from manifest.json
function getVersion() {
var xhr = new XMLHttpRequest();
xhr.open('GET', chrome.extension.getURL('manifest.json'), false);
xhr.send(null);
var manifest = JSON.parse(xhr.responseText);
return manifest.version;
}
/**
* Слушает события на табах
*/
OptionsPage.prototype.listenTabs = function() {
var options = this;
options._selectedItem = document.querySelector('.tabs-item.selected');
options._selectedContent = document.querySelector('.tabs-content-item.selected');
Array.prototype.forEach.call(document.querySelectorAll('.tabs-item'), function(tabItem) {
var tabContent = document.querySelector(tabItem.getAttribute('href'));
tabItem.addEventListener('click', function() {
options._selectedItem.classList.remove('selected');
options._selectedContent.classList.remove('selected');
this.classList.add('selected');
tabContent.classList.add('selected');
options._selectedItem = this;
options._selectedContent = tabContent;
}, false);
});
};
new OptionsPage();

File diff suppressed because it is too large Load Diff

View File

@ -1,17 +1,18 @@
{
"manifest_version": 2,
"name": "Point+",
"version": "1.8",
"author": "Alexey Skobkin",
"version": "1.42.1",
"default_locale": "ru",
"author": "__MSG_ext_author__",
"homepage_url": "https://bitbucket.org/skobkin/chrome_point_plus",
"description": "More features for point.im",
"description": "__MSG_ext_description__",
"options_page": "options.html",
"page_action": {
"default_icon": {
"19": "images/icon19.png",
"38": "images/icon38.png"
},
"default_title": "Point+",
"default_title": "__MSG_ext_page_action_title__",
"default_popup": "options.html"
},
"icons": {
@ -26,15 +27,14 @@
{
"matches": ["http://*.point.im/*", "https://*.point.im/*"],
"js": [
"js/jquery-1.10.1.min.js",
"js/jquery.fancybox.pack.js", "js/jquery.fancybox-media.js",
"js/markitup/jquery.markitup.js", "js/markitup/sets/markdown/set.js",
"js/options.js",
"vendor/jquery/dist/jquery.min.js",
"js/options-manager.js",
"js/message-sender.js",
"js/point-plus.js"
],
"css": [
"css/jquery.fancybox.css",
"css/markitup/skins/markitup/style.css", "css/markitup/sets/markdown/style.css",
"css/point-plus.css"
],
"run_at": "document_end"
@ -43,14 +43,24 @@
"web_accessible_resources": [
"images/*",
"includes/*",
"vendor/*",
"manifest.json"
],
"background": {
"scripts": ["js/background.js"]
},
"permissions": [
"http://point.im/*",
"https://point.im/*",
"http://*.point.im/*",
"https://*.point.im/*",
"https://pleer.com/*",
"http://player.soundcloud.com/*",
"https://player.soundcloud.com/*",
"https://api.kanaria.ru/point/*",
"https://*.twitter.com/*",
"https://api.instagram.com/*",
"https://coub.com/embed/*",
"storage",
"notifications",
"tabs"

View File

@ -0,0 +1,27 @@
.pp-notification {
display: block;
position: fixed;
bottom: 40px;
right: 40px;
padding: 20px;
border-radius: 2px;
font-size: 15px;
line-height: 20px;
transition: all 10s ease-in;
color: #fff;
}
.pp-notification a,
.pp-notification a:visited {
color: #fff;
text-decoration: none;
font-weight: bold;
}
.pp-notification-success {
background: #4CAF50;
}
.pp-notification.pp-fade {
opacity: 0;
}

View File

@ -0,0 +1,311 @@
/**
* Находит элемент #comments, и если он есть, начинает слушать на нём события
* @constructor
*/
function AjaxComments() {
var comments = document.querySelector('#comments');
if (comments) {
this._comments = comments;
this.listen(comments);
this.listenFirstComments();
}
}
/**
* Вешает обработчики. Магия в последнем параметре addEventListener
*/
AjaxComments.prototype.listen = function(elem) {
elem.addEventListener('submit', this.onSubmit.bind(this), true);
elem.addEventListener('keypress', this.onKeypress.bind(this), true);
};
/**
* Слушает отправки первых комментариев
*/
AjaxComments.prototype.listenFirstComments = function() {
var posts = document.querySelectorAll('.post-content');
// Чтобы не ловить события на чём попало и мочь использовать useCapture, приходится
// получать все post-content и на каждый вешать обработчики.
Array.prototype.forEach.call(posts, this.listen.bind(this));
};
/**
* Обрабатывает событие отправки формы
* @param {Event} event Событие отправки
*/
AjaxComments.prototype.onSubmit = function(event) {
var $form = $(event.target);
event.preventDefault();
event.stopPropagation();
if ($form.hasClass('reply-form')) {
this.submit($form);
}
};
/**
* Проверяет, выбран ли файл. Если да отправляет форму с перезагрузкой, иначе аяксом
* @param {jQuery} $form Элемент формы
*/
AjaxComments.prototype.submit = function($form) {
var proc;
if (this.isFileSelected($form)) {
$form.submit();
} else {
proc = new AjaxCommentProcessor($form);
}
};
/**
* Обрабатывает нажатия кнопок. Если это сочетание Ctrl|+Enter, отправляет коммент
* @param {Event} event Событие нажатия кнопки
*/
AjaxComments.prototype.onKeypress = function(event) {
var $form;
if (this.isProperKeys(event)) {
event.preventDefault();
event.stopPropagation();
$form = $(event.target).closest('.reply-form');
if ($form.length) {
this.submit($form);
}
}
};
/**
* Проверяет, что нажато нужное сочетание клавишь
* @param {Event} event Событие нажатия
* @return {Boolean}
*/
AjaxComments.prototype.isProperKeys = function(event) {
return (event.keyCode === 10 || event.keyCode === 13) && (event.ctrlKey || event.metaKey);
};
/**
* @param {jQuery} $form
* @return {Boolean} Выбран ли файл
*/
AjaxComments.prototype.isFileSelected = function($form) {
var attach = $form.get(0).elements.attach;
if (attach) {
return Boolean(attach.files && attach.files.length);
} else {
return false;
}
};
/**
* Создаётся при каждой отправке комментария
* @param {jQuery} $form Элемент формы, на которой это произошло
*/
function AjaxCommentProcessor($form) {
this._$form = $form;
this._$post = $form.closest('.post');
this._$textarea = $form.find('textarea');
this._text = this._$textarea.val();
this._CSRF = $form.get(0).elements.csrf_token.value;
this._actionUrl = this._$form.attr('action');
this._postId = this._$post.data('id');
this._commentId = this._$post.data('comment-id');
this.sendComment();
}
/**
* Регулярка для урла, проверяюшая, не рекомендация ли это
* @type {RegExp}
*/
AjaxCommentProcessor.recommendationReg = /^\/[^/]*\/r$/;
/**
* Отправляет комментарий
*/
AjaxCommentProcessor.prototype.sendComment = function() {
this.setProgress(true);
$.ajax({
type: 'POST',
url: this.getUrl(),
data: {
text: this._text,
comment_id: this._commentId
},
beforeSend: this.beforeSend.bind(this),
error: this.onError.bind(this),
success: this.onSuccess.bind(this)
});
};
/**
* @return {Boolean} true это коммент-рекомендация, fasle обычный коммент
*/
AjaxCommentProcessor.prototype.isRecommendation = function() {
return this._isRec || (this._isRec = this.constructor.recommendationReg.test(this._actionUrl));
};
/**
* @return {String} Адрес, на который слать запрос
*/
AjaxCommentProcessor.prototype.getUrl = function() {
// Если это рекомендация комментария
if (this.isRecommendation() && this._commentId) {
return '/api/post/' + this._postId + '/' + this._commentId + '/r';
} else {
return '/api/post' + this._actionUrl;
}
};
/**
* Подкладывает CSRF-токен в заголовки запроса
* @param {XMLHttpRequest} xhr Объект запроса
*/
AjaxCommentProcessor.prototype.beforeSend = function(xhr) {
xhr.setRequestHeader('X-CSRF', this._CSRF);
};
/**
* Скрывает форму отправки комментария
* @return {[type]} [description]
*/
AjaxCommentProcessor.prototype.hideForm = function() {
this._$form.prev().prop('checked', false);
};
/**
* Создаёт новый комментарий, скрывает форму, снимает прогресс.
* @param {Object} data Ответ сервера
* @param {String} textStatus Статус ответа
*/
AjaxCommentProcessor.prototype.onSuccess = function(data, textStatus) {
var $textarea = this._$textarea;
if (textStatus === 'success') {
if (data.error) {
this.onError(null, null, data.error);
} else {
if (this.isRecommendation() && this._text.trim().length === 0) {
this.showSuccessRecommendation();
}/* else {
this.createComment(data);
}*/
this.hideForm();
// Cleaning textarea
$textarea.val('');
this.setProgress(false);
}
}
};
AjaxCommentProcessor.prototype.createComment = function(data) {
/* global create_comment_elements */
create_comment_elements({
id: data.comment_id,
toId: this._commentId || null,
postId: this._postId,
author: $('#name h1').text(),
text: this._text,
fadeOut: true,
isRec: this.isRecommendation()
}, this.insertComment.bind(this));
};
/**
* Вставляет комментарий в DOM
* @param {jQuery} $comment
*/
AjaxCommentProcessor.prototype.insertComment = function($comment) {
var $parentCommentChildren;
if ($('#comments #tree-switch a').eq(0).hasClass('active') || (this._commentId === undefined)) {
// Adding to the end of the list
$('.content-wrap #comments #post-reply').before($comment);
} else {
// Check for children
$parentCommentChildren = this._$post.next('.comments');
// @fixme Find a bug with lost indentation of new comment
// If child comment already exist
if ($parentCommentChildren.length) {
console.log('Child comments found. Appending...');
$parentCommentChildren.append($comment);
} else {
console.log('No child comments found. Creating...');
this._$post.after(
$('<div>')
.addClass('comments')
.append($comment)
);
}
}
this.showComment($comment);
};
AjaxCommentProcessor.prototype.showComment = function($comment) {
$('body').animate({
scrollTop: $comment.offset().top
}, 500);
};
/**
* Показывает алерт с ошибкой и снимает прогресс, если коммент не отправился
* @param {*} req
* @param {*} status
* @param {String} error
*/
AjaxCommentProcessor.prototype.onError = function(req, status, error) {
/* global alert */
alert(chrome.i18n.getMessage('msg_comment_send_failed') + '\n' + error);
this.setProgress(false);
};
/**
* Устанавливает прогресс
* @param {Boolean} isProgress true включить прогресс, false отключить
*/
AjaxCommentProcessor.prototype.setProgress = function(isProgress) {
this._$textarea.prop('disabled', isProgress);
this._$form.toggleClass('pp-progress', isProgress);
};
AjaxCommentProcessor.prototype.getRecommendationLink = function() {
var url = '//point.im/' + this._postId;
var text = '#' + this._postId;
if (this._commentId) {
url += '#' + this._commentId;
text += '/' + this._commentId;
}
return '<a href="' + url + '">' + text + '</a>';
};
AjaxCommentProcessor.prototype.showSuccessRecommendation = function() {
var $notification = $('<div>')
.addClass('pp-notification pp-notification-success');
$notification.html(this.getRecommendationLink() + ' ' + chrome.i18n.getMessage('msg_success_recommendation'));
$notification.on('transitionend', function() {
$notification.remove();
});
$('body').append($notification);
window.requestAnimationFrame(function() {
$notification.addClass('pp-fade');
});
};

View File

@ -0,0 +1,172 @@
/**
* Подгружает картинки через сервер Никиты
* @constructor
* @param {jQuery} $links Коллекция ссылок
* @param {OptionsManager} options Опции
*/
function Booru($links, options) {
this.count = 0;
this.loadAllImages($links, options.is('option_embedding_remove_original_link'));
}
/**
* Base URL of gelbooru picture API (@NokitaKaze)
* @type {String}
*/
Booru.baseUrl = 'https://evidell.xyz/get_booru_picture.php';
/* jshint maxlen:false */
Booru.services = {
danbooru: {
mask: new RegExp('^https?://danbooru\\.donmai\\.us/posts/([0-9]+)', 'i'),
matchNumber: 1
},
gelbooru: {
mask: new RegExp('^https?\\://(www\\.)?gelbooru\\.com\\/index\\.php\\?page\\=post&s\\=view&id=([0-9]+)', 'i'),
matchNumber: 2
},
safebooru: {
mask: new RegExp('^https?\\://(www\\.)?safebooru\\.org\\/index\\.php\\?page\\=post&s\\=view&id=([0-9]+)', 'i'),
matchNumber: 2
},
deviantart: {
mask: new RegExp('^https?\\://(www\\.)?([a-z0-9-]+\\.)?deviantart\\.com\\/art/[0-9a-z-]+?\\-([0-9]+)(\\?.+)?$', 'i'),
matchNumber: 3
},
e621: {
mask: new RegExp('^https?\\://(www\\.)?e621\\.net\\/post\\/show\\/([0-9]+)\\/', 'i'),
matchNumber: 2
},
derpibooru: {
mask: new RegExp('^https?\\://derpiboo\\.ru\\/([0-9]+)', 'i'),
matchNumber: 1
},
tumblr: {
mask: new RegExp('^https?\\://([0-9a-z-]+)\\.tumblr\\.com\\/post\\/([0-9]+)', 'i'),
matchNumber: 2,
params: {
add_username: 1
}
},
pixiv: {
mask: new RegExp('^https?://(www\\.)?pixiv\\.net\\/member_illust\\.php\\?mode\\=medium\\&illust_id\\=([0-9]+)', 'i'),
matchNumber: 2
},
animepicturesnet: {
mask: new RegExp('^http\\:\\/\\/anime\\-pictures\\.net\\/pictures\\/view_post\\/([0-9]+)', 'i'),
matchNumber: 1
}
};
/* jshint maxlen:120 */
/**
* Обрабатывает все картинки
* @param {jQuery} $links Коллекция ссылок
* @param {Boolean} removeOriginal Удалять ли оригинальную ссылку
*/
Booru.prototype.loadAllImages = function($links, removeOriginal) {
var booru = this;
$links.each(function(index, link) {
var $link = $(link);
var href = link.href;
var $image;
if ($link.hasClass('booru_pic')) {
return;
}
Object.keys(booru.constructor.services).some(function(service) {
$image = booru.createImageFromService(service, href);
return $image;
});
if ($image) {
$link.before($image);
this.count++;
if (removeOriginal) {
$link.remove();
}
}
});
};
/**
* Создаёт картинку исходя из сервиса, если адрес картинки матчится
* @param {String} service Идентификатор сервиса
* @param {String} href URL картинки (который вставлен в пост)
*/
Booru.prototype.createImageFromService = function(service, href) {
var serviceInfo = this.constructor.services[service];
var matches = href.match(serviceInfo.mask);
var imageArgs;
var params = {};
var key;
if (matches) {
imageArgs = [ service, matches[serviceInfo.matchNumber] ];
if (serviceInfo.params) {
for (key in serviceInfo.params) {
if (serviceInfo.params.hasOwnProperty(key)) {
params[key] = matches[serviceInfo.params[key]];
}
}
imageArgs.push(params);
}
return this.createImage.apply(this, imageArgs);
}
};
/**
* Создаёт ссылку с картикной
* @param {String} service Ключевое имя сервиса для Никиты
* @param {String} id Идентификатор картинки
* @param {Object} [params] Дополнительные параметры, которые надо добавить в url
* @returns {jQuery} Элемент ссылки
*/
Booru.prototype.createImage = function(service, id, params) {
var $link = $('<a>');
var $img = $('<img>');
var title = service + ' image #' + id;
var imageSource = this.getImageLink(service, id, params);
$link
.addClass('booru_pic')
.addClass('booru-' + service + '-' + id)
.addClass('postimg')
.attr({
href: imageSource,
id: 'booru_pic_' + this.count,
title: title,
target: '_blank'
});
$img.attr({
alt: title,
src: imageSource
});
$link.append($img);
return $link;
};
/**
* Генерирует ссылку на картинку
* @param {String} service Ключевое имя сервиса для Никиты
* @param {String} id Идентификатор картинки
* @param {Object} [params] Дополнительные параметры, которые надо добавить в url
* @returns {String} Ссылка на картинку
*/
Booru.prototype.getImageLink = function(service, id, params) {
return this.constructor.baseUrl + '?' + $.param($.extend({
domain: service,
id: id
}, params));
};

View File

@ -1,153 +1,307 @@
<!DOCTYPE html>
<html>
<head>
<title>Point Plus options</title>
<link rel="stylesheet" href="css/point-plus.css" type="text/css"/>
<script src="js/jquery-1.10.1.min.js"></script>
<script src="js/jquery.idTabs.min.js"></script>
<meta charset="utf-8">
<title data-i18n="options_page_title"></title>
<link rel="stylesheet" href="css/options.css" type="text/css">
</head>
<body class="pp-options">
<div class="tabs usual">
<ul class="idTabs">
<li><a href="#media">Media</a></li>
<li><a href="#other">Other</a></li>
<li><a href="#websocket">WebSockets</a></li>
<li><a href="#feedback">Feedback</a></li>
</ul>
<body>
<main>
<nav class="tabs-list">
<a class="tabs-item selected" href="#media" data-i18n="options_tabs_media"></a>
<a class="tabs-item" href="#other" data-i18n="options_tabs_other"></a>
<a class="tabs-item" href="#websocket" data-i18n="options_tabs_websocket"></a>
<a class="tabs-item" href="#feedback" data-i18n="options_tabs_feedback"></a>
</nav>
<div id="tabs-content">
<div class="tab-content" id="media">
<div class="option">
<input type="checkbox" id="option-fancybox"><label for="option-fancybox">Enable Fancybox</label>
<form class="tabs-content">
<section class="tabs-content-item selected" id="media">
<div class="option-node">
<input type="checkbox" name="option-fancybox" id="option-fancybox">
<label for="option-fancybox" data-i18n="option_fancybox"></label>
<div class="option">
<input type="checkbox" id="option-fancybox-images"><label for="option-fancybox-images">Use for images</label>
<label class="option-node">
<input type="checkbox" name="option-fancybox-images">
<span data-i18n="option_fancybox_images"></span>
</label>
<label class="option-node">
<input type="checkbox" name="option-fancybox-videos">
<span data-i18n="option_fancybox_videos"></span>
</label>
<label class="option-node">
<input type="checkbox" name="option-fancybox-posts">
<span data-i18n="option_fancybox_posts"></span>
</label>
<label class="option-node">
<input type="checkbox" name="option-fancybox-bind-images-to-one-flow">
<span data-i18n="option_fancybox_bind_images_to_one_flow"></span>
</label>
</div>
<div class="option">
<input type="checkbox" id="option-fancybox-videos"><label for="option-fancybox-videos">Use for videos (YouTube, ...)</label>
</div>
<label class="option-node">
<input type="checkbox" name="option-images-load-original">
<span data-i18n="option_images_load_original"></span>
</label>
<div class="option">
<input type="checkbox" id="option-fancybox-posts"><label for="option-fancybox-posts">Use for post links (including comments)</label>
<div class="option-node">
<input type="checkbox" name="option-embedding" id="option-embedding">
<label for="option-embedding" data-i18n="option_embedding"></label>
<label class="option-node">
<input type="checkbox" name="option-images-load-booru">
<span data-i18n="option_images_load_booru"></span>
</label>
<div class="option-node">
<input type="checkbox" name="option-videos-parse-links" id="option-videos-parse-links">
<label for="option-videos-parse-links" data-i18n="option_videos_parse_links"></label>
<div class="option-node">
<label>
<input type="radio" name="option-videos-parse-links-type" value="webm">
<span data-i18n="option_videos_parse_webm"></span>
</label>
<label>
<input type="radio" name="option-videos-parse-links-type" value="all" checked="checked">
<span data-i18n="option_videos_parse_all_links"></span>
</label>
</div>
</div>
<div class="option">
<input type="checkbox" id="option-images-load-original"><label for="option-images-load-original">Load original images instead of thumbnails</label>
<label class="option-node">
<input type="checkbox" name="option-audios-parse-links">
<span data-i18n="option_audios_parse_links"></span>
</label>
<label class="option-node">
<input type="checkbox" name="option-embedding-soundcloud">
<span data-i18n="option_embedding_soundcloud"></span>
</label>
<label class="option-node">
<input type="checkbox" name="option-embedding-pleercom">
<span data-i18n="option_embedding_pleercom"></span>
</label>
<label class="option-node">
<input type="checkbox" name="option-embedding-coubcom">
<span data-i18n="option_embedding_coubcom"></span>
</label>
<label class="option-node">
<input type="checkbox" name="option-embedding-twitter-tweets">
<span data-i18n="option_embedding_twitter_tweets"></span>
</label>
<label class="option-node">
<input type="checkbox" name="option-embedding-instagram-posts">
<span data-i18n="option_embedding_instagram_posts"></span>
</label>
<label class="option-node">
<input type="checkbox" name="option-embedding-remove-original-link">
<span data-i18n="option_embedding_remove_original_link">
</label>
</div>
<div class="option">
<input type="checkbox" id="option-embedding" disabled><label for="option-embedding">Enable embedding</label>
<div class="option-node">
<input type="checkbox" name="option-nsfw" id="option-nsfw">
<label for="option-nsfw" data-i18n="option_nsfw"></label>
<div class="option">
<input type="checkbox" id="option-embedding-soundcloud"><label for="option-embedding-soundcloud">Soundcloud</label>
<label class="option-node">
<input type="checkbox" name="option-nsfw-hide-posts">
<span data-i18n="option_nsfw_hide_posts"></span>
</label>
<div class="option-node">
<input type="checkbox" name="option-nsfw-blur-posts-images" id="option-nsfw-blur-posts-images">
<label for="option-nsfw-blur-posts-images" data-i18n="option_nsfw_blur_posts_images"></label>
<label class="option-node">
<input type="checkbox" name="option-nsfw-blur-posts-entire">
<span data-i18n="option_nsfw_blur_posts_entire"></span>
</label>
</div>
<div class="option">
<input type="checkbox" id="option-embedding-youtube" disabled><label for="option-embedding-youtube">YouTube</label>
<div class="option-node">
<input type="checkbox" name="option-nsfw-blur-comments-images" id="option-nsfw-blur-comments-images">
<label for="option-nsfw-blur-comments-images" data-i18n="option_nsfw_blur_comments_images"></label>
<label class="option-node">
<input type="checkbox" name="option-nsfw-blur-comments-entire">
<span data-i18n="option_nsfw_blur_comments_entire"></span>
</label>
</div>
</div>
</section>
<section class="tabs-content-item" id="other">
<div class="option-node">
<input type="checkbox" name="option-ajax" id="option-ajax">
<label for="option-ajax" data-i18n="option_ajax"></label>
<label class="option-node">
<input type="checkbox" name="option-ajax-comments">
<span data-i18n="option_ajax_comments"></span>
</label>
</div>
<div class="option-node">
<input type="checkbox" name="option-right-panel" id="option-right-panel">
<label for="option-right-panel" data-i18n="option_right_panel"></label>
<label class="option-node">
<input type="checkbox" name="option-right-panel-to-unread">
<span data-i18n="option_right_panel_to_unread"></span>
</label>
</div>
<label class="option-node">
<input type="checkbox" name="option-fluid-layout">
<span data-i18n="option_fluid_layout"></span>
</label>
<label class="option-node">
<input type="checkbox" name="option-visual-editor-post">
<span data-i18n="option_visual_editor_post"></span>
</label>
<label class="option-node">
<input type="checkbox" name="option-search-with-google">
<span data-i18n="option_search_with_google"></span>
</label>
<div class="option-node">
<input type="checkbox" name="option-enlarge-font" id="option-enlarge-font">
<label for="option-enlarge-font" data-i18n="option_enlarge_font"></label>
<div class="option-node">
<label>
<input type="radio" name="option-enlarge-font-size" value="85" checked="checked"> 0.85 em
</label>
<label>
<input type="radio" name="option-enlarge-font-size" value="100"> 1 em
</label>
<label>
<input type="radio" name="option-enlarge-font-size" value="110"> 1.1 em
</label>
</div>
</div>
<div class="tab-content" id="other">
<div class="option">
<input type="checkbox" id="option-ctrl-enter"><label for="option-ctrl-enter">Send post and comments by CTRL+Enter</label>
<label class="option-node">
<input type="checkbox" name="option-at-before-username">
<span data-i18n="option_at_before_username"></span>
</label>
<label class="option-node">
<input type="checkbox" name="option-other-hightlight-post-comments">
<span data-i18n="option_other_hightlight_post_comments"></span>
</label>
<label class="option-node">
<input type="checkbox" name="option-other-show-recommendation-count">
<span data-i18n="option_other_show_recommendation_count"></span>
</label>
<label class="option-node">
<input type="checkbox" name="option-other-scroll-space-key">
<span data-i18n="option_other_scroll_space_key"></span>
</label>
<label class="option-node">
<input type="checkbox" name="option-other-comments-nesting-level">
<span data-i18n="option_other_comments_nesting_level"></span>
</label>
<div class="option-node">
<input type="checkbox" name="option-other-comments-count-refresh" id="option-other-comments-count-refresh">
<label for="option-other-comments-count-refresh" data-i18n="option_other_comments_count_refresh"></label>
<label class="option-node">
<input type="checkbox" name="option-other-comments-count-refresh-title">
<span data-i18n="option_other_comments_count_refresh_title"></span>
</label>
</div>
<div class="option">
<input type="checkbox" id="option-layout-fluid"><label for="option-layout-fluid">Fluid layout</label>
<label class="option-node">
<input type="checkbox" name="option-other-comments-user-system">
<span data-i18n="option_other_comments_user_system"></span>
</label>
<label class="option-node">
<input type="checkbox" name="option-other-move-all-to-menu">
<span data-i18n="option_other_move_all_to_menu"></span>
</label>
<label class="option-node">
<input type="checkbox" name="option-other-remove-fucking-button">
<span data-i18n="option_other_remove_fucking_button"></span>
</label>
<label class="option-node">
<input type="checkbox" name="option-other-post-draft-save">
<span data-i18n="option_other_post_draft_save"></span>
</label>
</section>
<section class="tabs-content-item" id="websocket">
<div class="option-node">
<input type="checkbox" name="option-ws" id="option-ws">
<label for="option-ws" data-i18n="option_ws"></label>
<div class="option-node">
<input type="checkbox" name="option-ws-comments" id="option-ws-comments">
<label for="option-ws-comments" data-i18n="option_ws_comments"></label>
<label class="option-node">
<input type="checkbox" name="option-ws-comments-color-fadeout">
<span data-i18n="option_ws_comments_color_fadeout"></span>
</label>
<label class="option-node">
<input type="checkbox" name="option-ws-comments-notifications">
<span data-i18n="option_ws_comments_notifications"></span>
</label>
</div>
<div class="option">
<input type="checkbox" id="option-visual-editor-post"><label for="option-visual-editor-post">Show visual editor for posts</label>
</div>
<div class="option-node">
<input type="checkbox" name="option-ws-posts" id="option-ws-posts">
<label for="option-ws-posts" data-i18n="option_ws_posts"></label>
<div class="option">
<input type="checkbox" id="option-search-with-google"><label for="option-search-with-google">Use Google search in header</label>
</div>
<label class="option-node">
<input type="checkbox" name="option-ws-posts-add" disabled>
<span data-i18n="option_ws_posts_add"></span>
</label>
<div class="option">
<input type="checkbox" id="option-enlarge-font"><label for="option-enlarge-font">Enlarge font size</label>
<label class="option-node">
<input type="checkbox" name="option-ws-posts-notifications">
<span data-i18n="option_ws_posts_notifications"></span>
</label>
</div>
</div>
</section>
<div class="option">
<input name="pp-font-size" id="option-enlarge-font-85" type="radio" value="85" checked="checked"><label for="option-enlarge-font-85">0.85em</label>
<input name="pp-font-size" id="option-enlarge-font-100" type="radio" value="100"><label for="option-enlarge-font-100">1em</label>
<input name="pp-font-size" id="option-enlarge-font-110" type="radio" value="110"><label for="option-enlarge-font-110">1.1em</label>
</div>
</div>
<section class="tabs-content-item" id="feedback">
<div data-i18n="options_feedback_text"></div>
</section>
</form>
</main>
<div class="option">
<input type="checkbox" id="option-at-before-username"><label for="option-at-before-username">&#64; before username</label>
</div>
</div>
<p class="saved hidden" data-i18n="options_text_saved"></p>
<div class="tab-content" id="websocket">
<div class="option">
<input type="checkbox" id="option-ws"><label for="option-ws">Enable WebSockets</label>
<div class="option">
<input type="checkbox" id="option-ws-comments"><label for="option-ws-comments">Process comments</label>
<div class="option">
<input type="checkbox" id="option-ws-comments-color-fadeout"><label for="option-ws-comments-color-fadeout">Fade out highlight in 20 sec</label>
</div>
<div class="option">
<input type="checkbox" id="option-ws-comments-notifications"><label for="option-ws-comments-notifications">Show desktop notifications (Chrome only)</label>
</div>
</div>
<div class="option">
<input type="checkbox" id="option-ws-feeds" disabled><label for="option-ws-feeds">Process feeds</label>
<div class="option">
<input type="checkbox" id="option-ws-feeds-subscriptions"><label for="option-ws-feeds-subscriptions">Subscriptions feed</label>
</div>
<div class="option">
<input type="checkbox" id="option-ws-feeds-blogs"><label for="option-ws-feeds-blogs">User blog pages (only when subscribed)</label>
</div>
</div>
</div>
</div>
<div class="tab-content" id="feedback">
<div class="text">
<p>
If you find an error do not hesitate to <a href="https://bitbucket.org/skobkin/chrome_point_plus/issues?status=new&status=open" target="_blank">send me a bug report</a>.
<footer class="footer">
<p>Point+ <span id="version"></span> by
<a href="https://skobkin-ru.point.im/" target="_blank">@skobkin-ru</a>,
<a href="https://isqua.point.im/" target="_blank">@isqua</a>,
<a href="https://nokitakaze.point.im/" target="_blank">@NokitaKaze</a>
</p>
<p>
You can make a donation in the following ways:
</p>
<p>
Yandex.Money: 41001539215836
</p>
<p>
Novacoin: 4d1ctdZtKkv3kxGdAXjfNEjfFvtDVdbf65
</p>
<p>
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=WW33X5J5WFSP4" target="_blank">PayPal</a>
</p>
</div>
</div>
</div>
<div id="panel">
<div id="status"></div>
<div class="left">
<button id="save" class="button">Save</button>
</div>
<div class="right">
<div id="pp-version"></div>
</div>
</div>
</div>
</footer>
<script src="js/options.js"></script>
<script src="js/i18n.js"></script>
</body>
</html>

View File

@ -1,5 +0,0 @@
config.folder=
file.reference.src-chrome_point_plus=.
files.encoding=UTF-8
site.root.folder=${file.reference.src-chrome_point_plus}
test.folder=

View File

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.web.clientproject</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/clientside-project/1">
<name>chrome_point_plus</name>
</data>
</configuration>
</project>

8
pack_chromium.sh Normal file
View File

@ -0,0 +1,8 @@
#!/usr/bin/env bash
BROWSER_BINARY=$1
PATH_EXTENSION=$2
PATH_KEY=$3
echo "Packing extension using $BROWSER_BINARY and key from $PATH_KEY"
#echo "$BROWSER_BINARY --pack-extension=$PATH_EXTENSION --pack-extension-key=$PATH_KEY"
eval "$BROWSER_BINARY --pack-extension=$PATH_EXTENSION --pack-extension-key=$PATH_KEY"

2
pack_zip.sh Normal file
View File

@ -0,0 +1,2 @@
#!/usr/bin/env bash
zip -9 -r chrome_point_plus.zip chrome_point_plus

25
package.json Normal file
View File

@ -0,0 +1,25 @@
{
"name": "chrome-point-plus",
"version": "1.42.1",
"description": "Chrome extension for point.im",
"main": "index.js",
"scripts": {
"postinstall": "./node_modules/.bin/bower install && grunt",
"lint": "./node_modules/.bin/jshint . && ./node_modules/.bin/jscs .",
"test": "npm run lint"
},
"repository": {
"type": "git",
"url": "git@bitbucket.org:skobkin/chrome_point_plus.git"
},
"author": "\"Alexey Skobkin\"",
"license": "MIT",
"devDependencies": {
"bower": "^1.3.12",
"grunt": "^0.4.5",
"grunt-bump": "^0.3.0",
"grunt-contrib-copy": "^0.7.0",
"jscs": "^1.10.0",
"jshint": "^2.6.0"
}
}