From 1722478df80c8d2e0e6697e86c7784d6d4723c76 Mon Sep 17 00:00:00 2001 From: skobkin Date: Wed, 19 Mar 2014 21:36:40 -0700 Subject: [PATCH] New features: visual editor for posts, search with google. Fixes: fluid layout header, subheader and footer, https pages. --- .../css/markitup/sets/markdown/style.css | 54 ++ .../css/markitup/skins/markitup/style.css | 147 ++++ chrome_point_plus/css/point-plus.css | 9 + .../images/markitup/sets/markdown/bold.png | Bin 0 -> 304 bytes .../images/markitup/sets/markdown/code.png | Bin 0 -> 859 bytes .../images/markitup/sets/markdown/h1.png | Bin 0 -> 276 bytes .../images/markitup/sets/markdown/h2.png | Bin 0 -> 304 bytes .../images/markitup/sets/markdown/h3.png | Bin 0 -> 306 bytes .../images/markitup/sets/markdown/h4.png | Bin 0 -> 293 bytes .../images/markitup/sets/markdown/h5.png | Bin 0 -> 304 bytes .../images/markitup/sets/markdown/h6.png | Bin 0 -> 310 bytes .../images/markitup/sets/markdown/italic.png | Bin 0 -> 223 bytes .../images/markitup/sets/markdown/link.png | Bin 0 -> 343 bytes .../markitup/sets/markdown/list-bullet.png | Bin 0 -> 344 bytes .../markitup/sets/markdown/list-numeric.png | Bin 0 -> 357 bytes .../images/markitup/sets/markdown/picture.png | Bin 0 -> 606 bytes .../images/markitup/sets/markdown/preview.png | Bin 0 -> 537 bytes .../images/markitup/sets/markdown/quotes.png | Bin 0 -> 743 bytes .../markitup/skins/markitup/bg-container.png | Bin 0 -> 322 bytes .../skins/markitup/bg-editor-bbcode.png | Bin 0 -> 1642 bytes .../skins/markitup/bg-editor-dotclear.png | Bin 0 -> 1682 bytes .../skins/markitup/bg-editor-html.png | Bin 0 -> 1534 bytes .../skins/markitup/bg-editor-json.png | Bin 0 -> 1529 bytes .../skins/markitup/bg-editor-markdown.png | Bin 0 -> 1783 bytes .../skins/markitup/bg-editor-textile.png | Bin 0 -> 1659 bytes .../skins/markitup/bg-editor-wiki.png | Bin 0 -> 1488 bytes .../markitup/skins/markitup/bg-editor-xml.png | Bin 0 -> 1495 bytes .../markitup/skins/markitup/bg-editor.png | Bin 0 -> 1745 bytes .../images/markitup/skins/markitup/handle.png | Bin 0 -> 258 bytes .../images/markitup/skins/markitup/menu.png | Bin 0 -> 254 bytes .../markitup/skins/markitup/submenu.png | Bin 0 -> 240 bytes chrome_point_plus/includes/preview.html | 16 + .../js/markitup/jquery.markitup.js | 665 ++++++++++++++++++ .../js/markitup/sets/markdown/set.js | 52 ++ chrome_point_plus/js/options.js | 19 +- chrome_point_plus/js/point-plus.js | 22 +- chrome_point_plus/manifest.json | 19 +- chrome_point_plus/options.html | 6 + 38 files changed, 1001 insertions(+), 8 deletions(-) create mode 100644 chrome_point_plus/css/markitup/sets/markdown/style.css create mode 100644 chrome_point_plus/css/markitup/skins/markitup/style.css create mode 100644 chrome_point_plus/css/point-plus.css create mode 100644 chrome_point_plus/images/markitup/sets/markdown/bold.png create mode 100644 chrome_point_plus/images/markitup/sets/markdown/code.png create mode 100644 chrome_point_plus/images/markitup/sets/markdown/h1.png create mode 100644 chrome_point_plus/images/markitup/sets/markdown/h2.png create mode 100644 chrome_point_plus/images/markitup/sets/markdown/h3.png create mode 100644 chrome_point_plus/images/markitup/sets/markdown/h4.png create mode 100644 chrome_point_plus/images/markitup/sets/markdown/h5.png create mode 100644 chrome_point_plus/images/markitup/sets/markdown/h6.png create mode 100644 chrome_point_plus/images/markitup/sets/markdown/italic.png create mode 100644 chrome_point_plus/images/markitup/sets/markdown/link.png create mode 100644 chrome_point_plus/images/markitup/sets/markdown/list-bullet.png create mode 100644 chrome_point_plus/images/markitup/sets/markdown/list-numeric.png create mode 100644 chrome_point_plus/images/markitup/sets/markdown/picture.png create mode 100644 chrome_point_plus/images/markitup/sets/markdown/preview.png create mode 100644 chrome_point_plus/images/markitup/sets/markdown/quotes.png create mode 100644 chrome_point_plus/images/markitup/skins/markitup/bg-container.png create mode 100644 chrome_point_plus/images/markitup/skins/markitup/bg-editor-bbcode.png create mode 100644 chrome_point_plus/images/markitup/skins/markitup/bg-editor-dotclear.png create mode 100644 chrome_point_plus/images/markitup/skins/markitup/bg-editor-html.png create mode 100644 chrome_point_plus/images/markitup/skins/markitup/bg-editor-json.png create mode 100644 chrome_point_plus/images/markitup/skins/markitup/bg-editor-markdown.png create mode 100644 chrome_point_plus/images/markitup/skins/markitup/bg-editor-textile.png create mode 100644 chrome_point_plus/images/markitup/skins/markitup/bg-editor-wiki.png create mode 100644 chrome_point_plus/images/markitup/skins/markitup/bg-editor-xml.png create mode 100644 chrome_point_plus/images/markitup/skins/markitup/bg-editor.png create mode 100644 chrome_point_plus/images/markitup/skins/markitup/handle.png create mode 100644 chrome_point_plus/images/markitup/skins/markitup/menu.png create mode 100644 chrome_point_plus/images/markitup/skins/markitup/submenu.png create mode 100644 chrome_point_plus/includes/preview.html create mode 100644 chrome_point_plus/js/markitup/jquery.markitup.js create mode 100644 chrome_point_plus/js/markitup/sets/markdown/set.js diff --git a/chrome_point_plus/css/markitup/sets/markdown/style.css b/chrome_point_plus/css/markitup/sets/markdown/style.css new file mode 100644 index 0000000..251af13 --- /dev/null +++ b/chrome_point_plus/css/markitup/sets/markdown/style.css @@ -0,0 +1,54 @@ +/* ------------------------------------------------------------------- +// markItUp! +// By Jay Salvat - http://markitup.jaysalvat.com/ +// ------------------------------------------------------------------*/ +.markItUp .markItUpButton1 a { + background-image:url(chrome-extension://__MSG_@@extension_id__/images/markitup/sets/markdown/h1.png); +} +.markItUp .markItUpButton2 a { + background-image:url(chrome-extension://__MSG_@@extension_id__/images/markitup/sets/markdown/h2.png); +} +.markItUp .markItUpButton3 a { + background-image:url(chrome-extension://__MSG_@@extension_id__/images/markitup/sets/markdown/h3.png); +} +.markItUp .markItUpButton4 a { + background-image:url(chrome-extension://__MSG_@@extension_id__/images/markitup/sets/markdown/h4.png); +} +.markItUp .markItUpButton5 a { + background-image:url(chrome-extension://__MSG_@@extension_id__/images/markitup/sets/markdown/h5.png); +} +.markItUp .markItUpButton6 a { + background-image:url(chrome-extension://__MSG_@@extension_id__/images/markitup/sets/markdown/h6.png); +} + +.markItUp .markItUpButton7 a { + background-image:url(chrome-extension://__MSG_@@extension_id__/images/markitup/sets/markdown/bold.png); +} +.markItUp .markItUpButton8 a { + background-image:url(chrome-extension://__MSG_@@extension_id__/images/markitup/sets/markdown/italic.png); +} + +.markItUp .markItUpButton9 a { + background-image:url(chrome-extension://__MSG_@@extension_id__/images/markitup/sets/markdown/list-bullet.png); +} +.markItUp .markItUpButton10 a { + background-image:url(chrome-extension://__MSG_@@extension_id__/images/markitup/sets/markdown/list-numeric.png); +} + +.markItUp .markItUpButton11 a { + background-image:url(chrome-extension://__MSG_@@extension_id__/images/markitup/sets/markdown/picture.png); +} +.markItUp .markItUpButton12 a { + background-image:url(chrome-extension://__MSG_@@extension_id__/images/markitup/sets/markdown/link.png); +} + +.markItUp .markItUpButton13 a { + background-image:url(chrome-extension://__MSG_@@extension_id__/images/markitup/sets/markdown/quotes.png); +} +.markItUp .markItUpButton14 a { + background-image:url(chrome-extension://__MSG_@@extension_id__/images/markitup/sets/markdown/code.png); +} + +.markItUp .preview a { + background-image:url(chrome-extension://__MSG_@@extension_id__/images/markitup/sets/markdown/preview.png); +} \ No newline at end of file diff --git a/chrome_point_plus/css/markitup/skins/markitup/style.css b/chrome_point_plus/css/markitup/skins/markitup/style.css new file mode 100644 index 0000000..fd86683 --- /dev/null +++ b/chrome_point_plus/css/markitup/skins/markitup/style.css @@ -0,0 +1,147 @@ +/* ------------------------------------------------------------------- +// 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; +} +.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; +} +.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; +} +.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; +} +/***************************************************************************************/ +.html .markItUpEditor { + 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); +} +.textile .markItUpEditor { + 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); +} +.wiki .markItUpEditor, +.dotclear .markItUpEditor { + background-image:url(chrome-extension://__MSG_@@extension_id__/images/markitup/skins/markitup/bg-editor-wiki.png); +} \ No newline at end of file diff --git a/chrome_point_plus/css/point-plus.css b/chrome_point_plus/css/point-plus.css new file mode 100644 index 0000000..93a3bc6 --- /dev/null +++ b/chrome_point_plus/css/point-plus.css @@ -0,0 +1,9 @@ +/* MarkItUp margin fix */ +div#markItUpText-input { + margin-top: 30px; +} + +/* MarkItUp override */ +.markItUp { + width:770px; +} \ No newline at end of file diff --git a/chrome_point_plus/images/markitup/sets/markdown/bold.png b/chrome_point_plus/images/markitup/sets/markdown/bold.png new file mode 100644 index 0000000000000000000000000000000000000000..889ae80e37b6167cc15f2a89e05a183815ec18b2 GIT binary patch literal 304 zcmV-00nh%4P)b^}|6b=Y6y(;Y{!a!g z@UQp#@Aw}>L3(}s|7f5BUjeuKZvQRjV<2U7yvu*H{aAbvQ6K!@3oKzW z-{Qa8d3gae1^)HE{~f^!v<1}u>;4xnKvUpW540I-w9J3a{{r=B3T*2g{_BH1CtaZO zpZ`6V0*V5g1e5i;`_=Z#_e=H*@8|93RG@lX;D!K7TKswwko8{x00005>jf6w4x#gTU%_MMNlkNp$oSbvBp&uHw9M;u0-4@=t5BI zP6Hx#-C_{5RMJ z0_P+Xkumexn8%)S+Y)#l(gR;YJP<6#1-=jjK0LONWPdJQIR8uK1HpvVIxBIQ2ztt+ zqoEx_X9S%QGMe=~(k#sebCL-an)%CR%a7YtUOQUgv+G>~?N~XSWhx=? z@$fx}0MB;$`JWcQ-Re{XV~5|{DvU(#*+NF*g)j^qk#b~G9_O!i*y&mZVZ=a3;Go(K z`DkskYn56Nhu+k@1Ke*uY|x zI&k6j$JfNe_a{GH%=n2rZOz$Z8R9V?Pe36hIk}jo+A-`;dt9vyvBu#Xm@veu&@v`| zzt%mwc_$nd0-sMVx2d)b0!MqGxmfCumx7yB#nIUWvA{!HOMfslMyW1iV&nY>zxwyj z8^JfLN|kT z4m^Q1mhO(_r4w@`V?H=YNkOf(i&bHT3Auc3bryK1_{hDSetLoLN{VLB^78ULiNFy^ zkUqqG$fjVkJj5tfWkOn|P5`HVEp5@-mGnc0wvJGHC=+39MC2TWT#i?t*~fNch*he_ zgtS^8dH$(KlW)EF1b4Fzv~?&0IQaNdg;W5&{t&Bmg9&N1-rBBr_;Rg8ekw^mn;@T# zlS{|Rq+-Nlg18i%UY;i|q1NnSwf>I@85#4U4002ovPDHLkV1mEDi4_0< literal 0 HcmV?d00001 diff --git a/chrome_point_plus/images/markitup/sets/markdown/h1.png b/chrome_point_plus/images/markitup/sets/markdown/h1.png new file mode 100644 index 0000000000000000000000000000000000000000..9c122e91e358860733eaf08fd543e5fc585d4cfd GIT binary patch literal 276 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!60wlNoGJgf6SkfJR9T^zbpD<_bdI{u9mbgZg z1m~xflqVLYGB~E>C#5QQ<|d}62BjvZR2H60wE-$x=IP=XqH%ujg^j!|20W|*-XbO@ zAtBSd^khRzd{=pNv@vN)9uZDqGTXuVPf6#I=?;x2B`Y;1YQMI>>GxvE??vtn{c>{A z7MYxUVrui2JTF|YR&ldntL8M3{q7no52$4`vIX;r@S8@YTFOM5*~nV4Gk-UYI5L$} zDw(h9UDksmVjphbEsSQ?UdGUxU4Htk{EZoY&3@-Y5*_;Wwk`ZAkg@!FaC~ii{N>;; VD%(>GD}XL$@O1TaS?83{1OVXtVO9VD literal 0 HcmV?d00001 diff --git a/chrome_point_plus/images/markitup/sets/markdown/h2.png b/chrome_point_plus/images/markitup/sets/markdown/h2.png new file mode 100644 index 0000000000000000000000000000000000000000..fbd87657fbe001c0a78fb095284fffc32e739497 GIT binary patch literal 304 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!60wlNoGJgf6SkfJR9T^zbpD<_bdI{u9mbgZg z1m~xflqVLYGB~E>C#5QQ<|d}62BjvZR2H60wE-$ROXGNhtQ`{C(%$wdeB3 zGTnLdz~IMJtNg?T>Z(s;oVU0)KW5x*9xvq)rPF;` zY|Fc4&#rLa>Txf#@y+aKf+ac0%`STzAI(*qdYo^XFH557y+_x*JpKO5^1S9?c^6}{ zP=+&OVHtDUrGNmdKI;Vst0KHFj AM*si- literal 0 HcmV?d00001 diff --git a/chrome_point_plus/images/markitup/sets/markdown/h3.png b/chrome_point_plus/images/markitup/sets/markdown/h3.png new file mode 100644 index 0000000000000000000000000000000000000000..c7836cf09e4565cc76c13bd14c13971c9e093c40 GIT binary patch literal 306 zcmV-20nPr2P)wEzGB literal 0 HcmV?d00001 diff --git a/chrome_point_plus/images/markitup/sets/markdown/h4.png b/chrome_point_plus/images/markitup/sets/markdown/h4.png new file mode 100644 index 0000000000000000000000000000000000000000..4e929eaf583f10cf50eb1666ff6530b9d4cc7915 GIT binary patch literal 293 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!60wlNoGJgf6SkfJR9T^zbpD<_bdI{u9mbgZg z1m~xflqVLYGB~E>C#5QQ<|d}62BjvZR2H60wE-&H?&;zfqH%ujg^j$;1_G=B-XbO( zon2btF4r#xDw?mmvtwaL3R_~+Yz66*rrQmiHySwec#9a-mn?F*9`VcnzTNDrbNY9( zxOA;CUb9S|sk-b7=Pc<<>lMA8+|AaBj(NoLhh2`-;+F zenR#-z6;(Syt?;Ub#DVE_OC literal 0 HcmV?d00001 diff --git a/chrome_point_plus/images/markitup/sets/markdown/h5.png b/chrome_point_plus/images/markitup/sets/markdown/h5.png new file mode 100644 index 0000000000000000000000000000000000000000..30cabebf7445e168a0f31b0ed68c43d54eaf017d GIT binary patch literal 304 zcmV-00nh%4P)ZVg9Hj*!Zw zxkAM~zCH&l><=6QeDdgV4l9hop+%GWq_IPV?Z641X8iiHrWJUN^2}hSiGjhsfbOLp z?d`9_MC0P3jVAVsEwEMMb0n zB0~XIzS#Ls)C#5QQ<|d}62BjvZR2H60wE-$B^mK6y(Kw&{<9vg>Q9!g~ne(gm zmj4swoA@7?D86%i^8WzK9JM17E&sp&Z#dpHfz$E-U9ks&4?Z9Gyg!%0k2Q{M-Tz#> z2OnD>vrPZ*#{EHKLq)>Jcx{H|Ovdb&|4aQZWSipI{El%e^Cxx{^9vSw28s;a3IDB= TS1%U=TF&6<>gTe~DWM4fm>N^1 literal 0 HcmV?d00001 diff --git a/chrome_point_plus/images/markitup/sets/markdown/link.png b/chrome_point_plus/images/markitup/sets/markdown/link.png new file mode 100644 index 0000000000000000000000000000000000000000..25eacb7c2524142262d68bf729c5e2b61adfd6d4 GIT binary patch literal 343 zcmV-d0jU0oP)$`dXYaZs9=SbAto%g@>T~?_bH&lTUn@`uo|1bXE{eSR(AO)ESb=V4`uk}mK|39Px&03WLbv~pzk+s7D@lK^ zn+aB+sp)&Y_x-B3>;6ywU--WQNUr<8>TU0P-|L#1U&;A)67w(+> pDf@fM7q9#F25QXo3rUI;002ro52U44e~JJA002ovPDHLkV1l;_q@Mr) literal 0 HcmV?d00001 diff --git a/chrome_point_plus/images/markitup/sets/markdown/list-bullet.png b/chrome_point_plus/images/markitup/sets/markdown/list-bullet.png new file mode 100644 index 0000000000000000000000000000000000000000..4a8672bde48f806d3d4d37db192588a9aa3eac10 GIT binary patch literal 344 zcmV-e0jK_nP)PbXFR5;6H z`2YVu10|S&DhA}te_Swi*Xsu$nk)lAnzx?+_#Z@r_~qs0*+Bfiq@?73K|#U)?Ck9S zsi~>|6A}{sM@B~e4-O9gPhA%bd?2RGd{of6>E(lvp1b6Ep>6&12TPB<{a?EDDL4@0 z;^ML+A|n0=1_u83^78uc?CkvC#>VEqiHXU7U0vP(YHDhzff&$ntDt1@;|H#l*M@2! z+U8#>h@W=vfpy*`^1J}j+`sMRe-I7g8yOj8Yin!&S5Z;VicFNp}SURRVGD{CSNFe~ni^^#wyl5uzj4je z|23%2?k#{x(*%mqe9M%mih+W%ElRQ}7!$^91> z7ymCLB=nz$hvz>#JNtiTW@gkt1Zf0eyP_){bPq%T_kY#2Z7&xs00000NkvXXu0mjf DNYA0= literal 0 HcmV?d00001 diff --git a/chrome_point_plus/images/markitup/sets/markdown/picture.png b/chrome_point_plus/images/markitup/sets/markdown/picture.png new file mode 100644 index 0000000000000000000000000000000000000000..4a158fef7e0da8fd19525f574f2c4966443866cf GIT binary patch literal 606 zcmV-k0-^nhP)Q2rnAt>LM%-F zK|rtwgcU)}7x~z1Hrcs5bH*ZO$!>xO8K#?==bZPQ_ecnV>#P`H`QzGaRhd62G_&rC zTLU$c7_x*nFP_dW#Q+*);mMHE?j)HexK784D4x9l_tfpz2$@1y}9rkF+ zI+J5NMWeZyObc!d+rUc=>D+uOdAOg#%+Ej6h+wn5^xPmVVH*Eu446Y0A_@ zo$rlds-+sL10DbHs{AQG2a)rMyf zFQK~pm1x3+7!nu%-M`k}``c>^00{o_1pjWJUTfl8mg=3qGEl8H@}^@w`VUx0_$uy4 z2FhRqKX}xI*?Tv1DJd8z#F#0c%*~rM30HE1@2o5m~}ZyoWhqv>ql{V z1ZGE0lgcoK^lx+eqc*rAX1Ky;Xx3U%u#zG!m-;eD1Qsn@kf3|F9qz~|95=&g3(7!X zB}JAT>RU;a%vaNOGnJ%e1=K6eAh43c(QN8RQ6~GP%O}Jju$~Ld*%`mO1p?P)vCi#|P&Xm-dkucwL z3)87{8iWe96huvPHfK`KOdC2Z({T6vJ9pwDx$D4>d(Pqff6w7Lmj{5i6;ZyPPpPN; zroaW=6d#@oL2Fa53F~$Su10(RG%K0p3VTuP3?Z=nBA8z$uq+XLUL^QrC74`bU|!e| zr>hK{)%Q!vdmIO5Z3JIvaOyjOX`X@c8-ua03`Q&)f&%p*{(A$q`ZTTjk%q_T7>v^J zu!R-a9fFLScYlKkNBP_Cob=9m9JLVoC-?c{)eOtMnh7qNN{ejy2sM{pS^mgFHJm@(buuM4>=<5Vr$&Kzw{B?uPr; z(1Yf=#g)zADkWnx=MR%ykl| z3Ui42k+O2{bCn)01-s5Sxp|z{G2di&KT(_M6;$EI zDL57JFf}cw4bP1P$pgTRKH$0@h|~aA>j`qZ2*kU5t2EVD5#~@VNhqx{vz8ethDD-=+1vnemftUBA zF;N!Q%PBB5B=KLB#QO(CHe?;R+-C8M?ppDW>R$5`cCPq@YpusFRTaH1i9Kv;l<>I( Ze*oTy+;kdDB`N>_002ovPDHLkV1l3CM+g7_ literal 0 HcmV?d00001 diff --git a/chrome_point_plus/images/markitup/skins/markitup/bg-container.png b/chrome_point_plus/images/markitup/skins/markitup/bg-container.png new file mode 100644 index 0000000000000000000000000000000000000000..ec38b8e18d2fc097e89ba1109f22a0ace31df11e GIT binary patch literal 322 zcmeAS@N?(olHy`uVBq!ia0vp^0t^g{B^*pZ*3xFZb3lr@*vT`5gM;JtL;nXrE@y#9 zWHAE+w-5+3Ub-L1;G39Sl%JcLl9{OBmRXcqo?nz*tl%4= zU}Rum(q6XaJW#_HPZ!6KiaBrZ81fxa;9+r4`2K%;&~lFNY}!mS4X#Kwik5l5`fQ`R zDeA@Rpi}uh6LZ>o6n@E{o3rq{9Mi|$A=z_zqPpj19h|uC^{hS46)##89$ww?-kNRM zbz24oeTN;ULO_=vc<3;ZkwG9jikV>_Yl;*@5VIg_!xaY?#st*~77P)bDtrua42(<& zArD>`5e7bXF9rzF@U~HjnStSk;FXu>r!mZKvTub+fH8Q=U1+?g}A&6w0wS4*Vjo*Q$h(N5^ zdlu+0hQlj?dfvUuyS4i3*RTJ~fFgg+tl$BfHKRP_*b-hKmpOK^(e~}zC(BDqOMhO& z$iVO{C4>#=Iu1}cDBNLWP;j_U;` zkknkTvA2hW?*VXFWLV#ejgP4;k3yjVM z&Oo=D*31DWU|29spFSNqn7}bna#yRku+Z@5#=U!O&r2~dB>07HKlNoRFc@a^21>%h z0pi;

?i$Qwcb98o&x3poNUX)t=u!e^wUuN&|Pa}YFDaLwi*~qJjcOt^+Iau&n>%mTmLMqswC=M+$Y0jvU?IH6(pkMZ)!lb#(0i|Ni}ZvVZa7#hL!V zr2P;nX@iqUKbP0l+XkKOrq?L literal 0 HcmV?d00001 diff --git a/chrome_point_plus/images/markitup/skins/markitup/bg-editor-dotclear.png b/chrome_point_plus/images/markitup/skins/markitup/bg-editor-dotclear.png new file mode 100644 index 0000000000000000000000000000000000000000..b3188dcd5625c7c0a137ee1315a0e6ccf755fb20 GIT binary patch literal 1682 zcmd^<>rdNd6vt1C8{LIVw#m(Lc{5zdfNn#_Hc}|1796rFWe7!A2wlNh+flH!P}(qs zY$R4kx-bOGrjZQ|mkjBaIAGKSk<@|UFq_p?KoM3JV9h490!i@dx;Ii#$C~ z0kCZc^`d=mt#;yJP&xP2a!#4Ju)I|ER+OMrDhB4^_ydXY%tP%tnMRBVp(3(nr^=Ou zWny3#%ZkKNFO-&vm9nzaisRQKvj8?d%1C1iRLyp4|FQWuLxyY(oXxk{@|;~S@7^tV z82Rwzr>!+L$${Kpwy&=*TV0!4>zJ5+M>^gdUog4r9{=M-v!&&;BP^C{6M*ynoWWqY zdwPxcXf*c!^@dbxPj)0wz7&!iyiaE+0T}$AslL8G)=iaK z-Bgh9%mGU-Uead%M1v@u+!u5pb;pbk)?%uC7tT?c_o@?D9#wwTy9Egj6Ky0<6m=tI zWoc>2s?_WCGs!*O-TU>+SS`Eph7Y6w(RS~I7(k~@8*}3snA?SYl`7R<_hpO4awz~$ zG9^QlTat0KH)g!#uBd4yw0=K8S2{PK&85-v@@XLY@QZIzr6(n^+ciZw_fkDbr4e*? zcK)JKYPBa_9HCISoEQMWk9>*K;6D$MfYbbYM!$^3mn!E5(TwL55%NK1AuE+5; z)z$u<%4EVyDic?n&Z@HR{{H?C2+vD|_|0271U9QDL0+Bc)f!5hTUsi9R>kIbc+J-afssPY*1n$st${y!gT;kx+@J=)ZSqYjY4%}VP?71jI$B!UcS literal 0 HcmV?d00001 diff --git a/chrome_point_plus/images/markitup/skins/markitup/bg-editor-html.png b/chrome_point_plus/images/markitup/skins/markitup/bg-editor-html.png new file mode 100644 index 0000000000000000000000000000000000000000..11bff456808bf9f846ae0af5b4b0a7c3cfc020fc GIT binary patch literal 1534 zcmeAS@N?(olHy`uVBq!ia0y~yV15B)pWt8ul3!Y5B!Coiv6E*A2M5RPhyD+MT+RZI z$YKTtZXpn6ymYtj4^U9P#5JNMI6tkVJh3R1!8b9vC_gtfB{NaMEwd=KJijQrSixdz z#-$3NQZbNH=c3falFa-(g^6968`{@d_u)A# zSPitA#bPQWLqo&EmoGElNir}r2%3S6*sx6+Xk0>Z*xt}*|Nhne;(z=8eSI}BViGKu z8-c7Sod8nx3h0J|2M@L#2O1Yvs0H*b;~|h|)#jeMbN6m<-Em7^28Nuz_F$l|4y**( z=3_P0(#Gb_7a5?ZxxiK_fZUmI>F~!JO4Z;h68)l_J*dN0=l;0ERqYrVFV768D9!sef|3NMR{L;|8+xt28Im~ zQ+#gi@P9aUB9L#n`XBQ$eRXy9+4F!th&Tv#C?YrwUOo(g*aQyJgo?__nP{%LdiClT z`CmUjKi}TY$iOgdb0ILm8$9!;&O9_b9Tbdh*RNlHd4J!YJ%9cbR8{SoSqXHl>YP&y z3=ZJ9X|Uf@Sbh;0KlPIlQCR>EPUKLiuKvA#e{4*Q&;Ny+H*YRI19Ys;$9D5~`-{H< z_0E1A0t_Oiw(sA+?*v-P;C2I)jF93!yBZYV8!QnbEH;^DfgaO!ANCNrs z&?%fm4C$FzJKp;2$bK@)N9Saz`{|^z`zkv z9`dZexw(120WcUph)RRR1Q5EfNPagw4>WOhGT8P*vJ4DNEeOqhl`met%=|F(@ZrPq z{LBmtYs_A)HA=4d%)`Kt)3?|N=!gv!m6bEWZfgKr>QirTJ4UYieZvySlr( z+sgsn9&t8M5@`1aD-R$k@s)o@Uw{ApUoRd$Ok5Snz|gSXLJMdGMi7zAv|6=zsH#eU>59p7Gu=>(i63~ojP zEoeBqu@E(|=YaVLvmdMg1`rF@cmewv$r<283UTr2l~_UzVfll#p!9?usuqX<2OD(& z9GV-@90*RbI(Bw;$XN*yH3&d{w^BkBf O89ZJ6T-G@yGywn>7PO22 literal 0 HcmV?d00001 diff --git a/chrome_point_plus/images/markitup/skins/markitup/bg-editor-markdown.png b/chrome_point_plus/images/markitup/skins/markitup/bg-editor-markdown.png new file mode 100644 index 0000000000000000000000000000000000000000..c1997152233017b54827cc41e07d0a2870c3ddba GIT binary patch literal 1783 zcmds1`%hD682)Gxk;zK7F_25kE+ojZ70Wh?a;ZpB!d=R6p$r-=f(#0!P}maMm@RTC zb0(`(Afp*k3L$z*w?BU_bQhIp2A|_kG^y zdEPHSJoLDwg`EXL$TIMR|4D?%26*l=C&9Y(E!P(Q$Qgct9CLH?kw;-Vc-@zF;`0oI zUV8)kne>n4uEQox#6Bg86eNhmJRu*2@Jl6F4A@pr5 z^q7#(6D0{!oj6G;eB|ayXE5n*9#v7nWeAyt1o|K4WS7p21qC^Tyk(}V^$p-QT8*B| zv&qwa`2LG{$)$pZyaEruPd}>bdiM)fkKYwGV<7fU@JP!uuNw(f*FC#`Y_FU;mz+H9 zi;ym5IwUMi97{&1SK;CAK9FgN5R2?6M##Lkq_}uWZHAEIs6Z&Jo3=wpYNpB0&#y@a zpmyupOcRK8|J@NGlKCt`R*LATK~=p#+ahmG%*x7gScWjNp^=PO2oHKtba$zzr$^&= z5TQ1=!`Km4+Fm3@=Z_#{>QbCe{}XWhdc1Qh@!WV3cRxaIr}}O( zoJYOj$jl*ESWT)*N=gW9cv0yuJy09XR5nLFF&fqD>^W^KtqC-XcPnQ=?Y7MCG0>@; zgxuVg`OWC)Xuazmgls#Mkloa3)C4)P#+0%{a3cFXhtNF$G=Pur&3m_R`{_67bb4nr zhUCh3SOYIlJbF-ASh!&0Sqiq9=}X`0PuU{b9N$52xcK5)oMUJ#m+OFoQmJG3FA8Fy zg2MY%onUQ$f4}P5;^N}GHMFw-y8d{DZ7sRWCS_D45-lyL z)at`eZ7}L^TPYGdG;{ZR0!B=b&YB|@iyt>rD3mzr(9qCuC6KFxu_AaNk;F1Q;T8@wQUd;8Xz z$xXN>WMhA{luo6&g0DMqE|m82$+gvaeRuo#__%@g`a( z_^(Y!IeWHZon7WDp%N2uAriAs!~x7%9GbAKk`R4@y(h9!8U1}Jt#%JW^>#KPSF2e@SaCzIwtUhJ%on=Nx z(k`Y_aTD*jM*g)ixVV_{@DnI$xm(`dsCQg6IFSEn@c$GljZ1o-Pw9SYp$C#sAUo8* I#xMT--?jQjjsO4v literal 0 HcmV?d00001 diff --git a/chrome_point_plus/images/markitup/skins/markitup/bg-editor-textile.png b/chrome_point_plus/images/markitup/skins/markitup/bg-editor-textile.png new file mode 100644 index 0000000000000000000000000000000000000000..3ab1e9f6e21ebbedd072bef63d352d26720801df GIT binary patch literal 1659 zcmeHGe^8Tk7=M70`2+I2+!?UgU#6%Hu^$7HEgdK-8_LGf4Tw2klCv=yQ$(BYOkG_V zSEPr8wZl6hV?cH0&O308+!WXmDCcmSFtxQNEUyJP&q2@o-F2?I{_dat*t>n-J>Tc~ z{CYmf7jBAMkgxy%;&L|&b^ye9@%L3mG(LYnR=fZIjOInmu&k2;OU`U!RzAv&67^is(B?zR`*+<=P;Rlr*;V5 z{~>YulY62S+s&3E$GW;6tUlLXxz4(NrtxR#%?nMQ=QH|6tz+pULqkJ60Mneb+i2uY zCje;Ur-p}z?R#)~hW(vb(8842Y!07q1OfqhXB2=pf6!(-(LE19-+Nik!CLQfXB4ot zRrH0u5(zIf{qUjvwbdNXOc1NQ*FMSwcxtg9V6k2y_Bh&mu**5Ql?4#Zr~zQ)&-w1_ zbUKfWqA2YZY}k;Oez){DyxX|+Y#LtU8)JYE?s$Nxqjawomn5Fq*`7cgKx%V~l-gpH zVDWLe7@yH%kw_EEfF#VTn|F zzZ+vx_RV)v>d+Mf@=8r2?DPj}Yo9xaT==o1i+-}oXS3x6x_WwMUm!qNWi`l(YS&(izVk*qTnd8FI!izm21M(_O47gIqGyK9Y87g3;#`2 z%Zas!s>3%mwKq(lt`Ez@!rv-)c6M|$=?n%#))QT@<4dXOc@wOJ8}$;c)P} zQQYH^{=SqFupLF@buE(_SDDvCOK}P-%>Bin_s*S`TKni|@E6+7zX%x$g<8k9cw_?u z7}I2Qy}XbfeSIx4?tFcH{nt0~tPTr;2nPoTKhwEfu74mj#^V}Bhcite-?;qf(Zoc1 zt=-{BEJN0&UHfQnO`oD-x3TB9JD=o}xX#D?w6?aMQR14opJfTxxT{hC7FmfSZCN~? zwG`9zoKV&b3M3e{iLCCV`a#W@uGxiJJzBe6?yvG3i?tStXy z&-l20W+zU%MjX(#Y(KrkQh^t_*=N&mRW^2FyWKL9_lRH~B=KaCoziGD;U#^KoFkG; m21eW>d;9-OTDAXHr3cCP;w#&V1Vs`IAmnBX1sxm8j{E@>bO@OM literal 0 HcmV?d00001 diff --git a/chrome_point_plus/images/markitup/skins/markitup/bg-editor-wiki.png b/chrome_point_plus/images/markitup/skins/markitup/bg-editor-wiki.png new file mode 100644 index 0000000000000000000000000000000000000000..7887181cc73d3c653ed7c3e92e2307accacfb502 GIT binary patch literal 1488 zcmeAS@N?(olHy`uVBq!ia0y~yV15B)pWt8ul3!Y5B!Coiv6E*A2M5RPhyD+MT+RZI z$YKTtZXpn6ymYtj4^U9P#5JNMI6tkVJh3R1!8b9vC_gtfB{NaMEwd=KJijQrSixdz z#-$3NQZbNH=c3falFa-(g^=1J_Eyp z|J!cdzd!#s4+F!2mZJv`9=wwdv{h}!4rT_214;S$`R|N@d||QOyLT7QXJlZQvEjze zn=>KG?-$DhvB-TU|d|4~pm-Fx@e{aY}3@?@wJLnVQ(`|)hmnfp5DL1y#l>+3_j zn-I!|?9iP%BmX)sU%otBj+KES;@IhxAcMh5+OA)}z7wdK!N;Hw=q84Td<+bX($$ut z3=B8sZG5e;e*OCJ`U^L2-n`Wg@>m+e+@7_k)@=Iw$^W$p(CY7ykUy3;wa}WEfg$Jo zja6r^UcK5s7w9F4L=;VP=Fj*4x4%>h7{-ioeyl({R~rGHV_;Uef6tznzm94^UvIDl zkpc>!C`zcPuAU8!ITm41Y}~j}Isr8xA&x!-kD47|`+VT>3l41tYj9{j0{IWDbj>LS z28RYjEF*j(YfHmFG0(yuM;W%*mX^;iE3n~1gTe~DWM4fEfK1( literal 0 HcmV?d00001 diff --git a/chrome_point_plus/images/markitup/skins/markitup/bg-editor-xml.png b/chrome_point_plus/images/markitup/skins/markitup/bg-editor-xml.png new file mode 100644 index 0000000000000000000000000000000000000000..33b1c5d83a4dde90e6b7f6312d4d046bf5532e22 GIT binary patch literal 1495 zcmeAS@N?(olHy`uVBq!ia0y~yV15B)pWt8ul3!Y5B!Coiv6E*A2M5RPhyD+MT+RZI z$YKTtZXpn6ymYtj4^U9P#5JNMI6tkVJh3R1!8b9vC_gtfB{NaMEwd=KJijQrSixdz z#-$3NQZbNH=c3falFa-(g^x7mgDH6kK3elg8cN?3f7=a|Lw=B=v~B@f5f<$UWo{PgKlc?O0D z|F_+^e}DdO9tMU39Y+ryJa{J^Xsz3f9n1_42a@vh^WPZ*`O0FuckeEq&&a?avGK;u zn=>KG_ZI^VV362;N-P^Y`!HFY;DaR=0i_0KIbk&+`zFsaimljIYB| z?PTQT^MA_#WuzvDrLH*$Wb9dUiUH`yC80Bce!E!h=jUf;1B}`YT?or&d?|SK^5si? z8CC{{h@%Mme5zKTdHeS53)^d%3=9d?K41r5I=nLY$NN=46KoHE{`?sdjuBHCVcvdy zPpi1Nc=H|$YwO!j29C_p}^Q>xSbpd z3{Xfo`9w|qncxiMrWw9`c;&oJ7tpo)Pp$&S9E;Da9r3ZTy83#0dSSJ|)R@zc@PtHM ze0+GVd8+)eb3mnkn1n&W4f2`)U0~qUod59co7s0s28ISfaKt!(V!ojO9$S;|fx__2 zX@u{w#@7L`JHW{XNpl$}WYD8p03OK)qKQcg*o{5}Nkt7t hst_2Y0~0)dn0tRZOT~)rWdUX_22WQ%mvv4FO#ntjreOd8 literal 0 HcmV?d00001 diff --git a/chrome_point_plus/images/markitup/skins/markitup/bg-editor.png b/chrome_point_plus/images/markitup/skins/markitup/bg-editor.png new file mode 100644 index 0000000000000000000000000000000000000000..ab7cde4850e081e787aef81f3893cc55ead0470b GIT binary patch literal 1745 zcmdT^YfMuI6h5WuYI$Y>VI5S0KV;pbh%lHaREC`h0)v)`P@$oQnC<_5^!E1Tob#RYec$PK zQ4wF*GFeOjunpZA5)D8f!}r?^D}27lO>n_4x*|AKz+f=?9!C!1&$a10;}iha?-C!{ zJyZ4q2G=Wh>`}(Z4k$Ckaw+THZY4J3mD(&5+4c74H7^$@elbbsdrVxm+q% zrpOMu3sTag;Pn~T+n?*@S1k-L2UxQ)G-SIVvux7TuzS+Utga%OrcPG z?1-IhVh_9R&owS$vG&#_8-P`pSf@Ye=OQgFz_34y*3h=f>3Rz+b0tF<`{>DhAhQhhlr(*5Y5MgKl+wr|CKoG1JInTB} zwY7znYy_Zip&5Ger0Ojv6f~CMnJL4_6-nt{&$@XE$tbr^O-&8zLBSSIEKk6je)Vea zuTMutMrOonwfZ3!msME=uo$Dja4P&Z1~-yH-u-P;PW*XiWQes=8b_H-*7iqXQBi4A zvP2?reTnv_Ycu^{2DA%lP_c~^hc~^r_~@`LHnd%?*X;Yf*Jw1>RdsZ9a8-sxl=ABP z)3GJbm*iJajBD-x*f=dMO&#dUW@mrvc?Pp)EtkgMJmsX){z8XlZn6(&#xy%Sn>m5# z92e3e8ww3)PoP%@E)El3Uqv~n;bFO09 z&Te{(>xTS#v)Me#?KPRqhc=;WlPD)Ctn{vu+x+1A{U#TryD4;~Af)Fhw?Ucc!oYL; z_z#2h-A5z6X>UqVO%SLF3SRD3@zvGQShU*Q28v>sw(C|BKt()dq5{73Tmn~8MjUD7 zG7E!5HKXD`0#PsK&6Gbi%FS53_3x|v|5NAe)%v^%v6qu4dI>^zM1<4^Cms14pj9C; literal 0 HcmV?d00001 diff --git a/chrome_point_plus/images/markitup/skins/markitup/handle.png b/chrome_point_plus/images/markitup/skins/markitup/handle.png new file mode 100644 index 0000000000000000000000000000000000000000..3993b20337e33a36c9125d139f1f53a279a4c128 GIT binary patch literal 258 zcmeAS@N?(olHy`uVBq!ia0vp^qCm{X#0(?@t!)i}6mzkYX9x!e$L)vy4}e^r0G|-o z4LkP#|NsB{_wSo_?oZ!X{TC?CQWE4B{GZ|f|H~VSrU3bz1s;*b3=G^tAk28_ZrvZC zpje4(M2T}zYGO%dex5=|W^O8jfw{hsp}v86ds2l5P=!25MR0yvNqJ&XDuZuga#4P6 zYD#9Jf?H-$YI%N9cCmuR){ILPK&1wrE{-7_Gm{H=1WS1m6Eb=Pa(faIBBVrjnVf1= soMNglKFuA6ghUcX`bbD&-ZPgg&ebxsLQ0Hz~TmH+?% literal 0 HcmV?d00001 diff --git a/chrome_point_plus/images/markitup/skins/markitup/menu.png b/chrome_point_plus/images/markitup/skins/markitup/menu.png new file mode 100644 index 0000000000000000000000000000000000000000..de337c88cc60930426346e9b2c3e6ccbcd2366dd GIT binary patch literal 254 zcmeAS@N?(olHy`uVBq!ia0vp^+#t-s1|(OmDOUqhEX7WqAsj$Z!;#Vf2?p z2!Sx;rMq>1fP$(et`Q}{`DrEPiAAXlzKO|2`MIennTZN+nMJAP`9;~q3ce8vMg|5Z z?PY7u12yD(x;TbZ%-MRukn2!@h|5Lcz>Q*pjvKc9{~dp5%>mwsY=x$y+dDsq9yFPm zB^RUD|1xXsvNXe)b426zd26P&a{I-fk!@FT&aQjZbGxFv;=zoRhIO%vr!Yy!Y&>S? s`Tz5C6}Q`b(O-I>T>hi~+4nos@;Lcr)9$X10b0%A>FVdQ&MBb@0RFIB0RR91 literal 0 HcmV?d00001 diff --git a/chrome_point_plus/images/markitup/skins/markitup/submenu.png b/chrome_point_plus/images/markitup/skins/markitup/submenu.png new file mode 100644 index 0000000000000000000000000000000000000000..03d1977aecf31666578422805c60cf61562ceea1 GIT binary patch literal 240 zcmeAS@N?(olHy`uVBq!ia0vp^+#t-s1|(OmDOUqhEa{HEjtmUzPnffIy#(?lOI#yL zg7ec#$`gxH85~pclTsBta}(23gHjVyDhp4h+5iD5&Wq={HDKYyh!yx+)ugh??;-Fdk_+?B=(Ett`c{f#J|ni6^h+9saOK z3Me!bX#Qh3B9wk^&d+Wg4grT7BK8ehe_Hhz1sr%56u2D&0-YC020Q`|Jxg4;92g7@ eConKD@i1hIny&nuDpC)04TGnvpUXO@geCwEnM@7< literal 0 HcmV?d00001 diff --git a/chrome_point_plus/includes/preview.html b/chrome_point_plus/includes/preview.html new file mode 100644 index 0000000..685b81e --- /dev/null +++ b/chrome_point_plus/includes/preview.html @@ -0,0 +1,16 @@ + + + + +markItUp! preview template + + + + + + diff --git a/chrome_point_plus/js/markitup/jquery.markitup.js b/chrome_point_plus/js/markitup/jquery.markitup.js new file mode 100644 index 0000000..9505faa --- /dev/null +++ b/chrome_point_plus/js/markitup/jquery.markitup.js @@ -0,0 +1,665 @@ +// ---------------------------------------------------------------------------- +// 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('

'); + $$.wrap('
'); + $$.wrap('
'); + $$.addClass("markItUpEditor"); + + // add the header before the textarea + header = $('
').insertBefore($$); + $(dropMenus(options.markupSet)).appendTo(header); + + // add the footer after the textarea + footer = $('
').insertAfter($$); + + // add the resize handle after textarea + if (options.resizeHandle === true && browser.safari !== true) { + resizeHandle = $('
') + .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 = $('
    '), 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 = $('
  • '+(button.separator||'')+'
  • ').appendTo(ul); + } else { + i++; + for (j = levels.length -1; j >= 0; j--) { + t += levels[j]+"-"; + } + li = $('
  • '+(button.name||'')+'
  • ') + .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 = $(''); + 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(//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); diff --git a/chrome_point_plus/js/markitup/sets/markdown/set.js b/chrome_point_plus/js/markitup/sets/markdown/set.js new file mode 100644 index 0000000..96970a4 --- /dev/null +++ b/chrome_point_plus/js/markitup/sets/markdown/set.js @@ -0,0 +1,52 @@ +// ------------------------------------------------------------------- +// markItUp! +// ------------------------------------------------------------------- +// Copyright (C) 2008 Jay Salvat +// http://markitup.jaysalvat.com/ +// ------------------------------------------------------------------- +// MarkDown tags example +// http://en.wikipedia.org/wiki/Markdown +// http://daringfireball.net/projects/markdown/ +// ------------------------------------------------------------------- +// Feel free to add more tags +// ------------------------------------------------------------------- +mySettings = { + previewParserPath: '', + onShiftEnter: {keepDefault:false, openWith:'\n\n'}, + markupSet: [ + {name:'First Level Heading', key:'1', placeHolder:'Your title here...', closeWith:function(markItUp) { return miu.markdownTitle(markItUp, '=') } }, + {name:'Second Level Heading', key:'2', placeHolder:'Your title here...', closeWith:function(markItUp) { return miu.markdownTitle(markItUp, '-') } }, + {name:'Heading 3', key:'3', openWith:'### ', placeHolder:'Your title here...' }, + {name:'Heading 4', key:'4', openWith:'#### ', placeHolder:'Your title here...' }, + {name:'Heading 5', key:'5', openWith:'##### ', placeHolder:'Your title here...' }, + {name:'Heading 6', key:'6', openWith:'###### ', placeHolder:'Your title here...' }, + {separator:'---------------' }, + {name:'Bold', key:'B', openWith:'**', closeWith:'**'}, + {name:'Italic', key:'I', openWith:'_', closeWith:'_'}, + {separator:'---------------' }, + {name:'Bulleted List', openWith:'- ' }, + {name:'Numeric List', openWith:function(markItUp) { + return markItUp.line+'. '; + }}, + {separator:'---------------' }, + {name:'Picture', key:'P', replaceWith:'![[![Alternative text]!]]([![Url:!:http://]!] "[![Title]!]")'}, + {name:'Link', key:'L', openWith:'[', closeWith:']([![Url:!:http://]!] "[![Title]!]")', placeHolder:'Your text to link here...' }, + {separator:'---------------'}, + {name:'Quotes', openWith:'> '}, + {name:'Code Block / Code', openWith:'(!(\t|!|`)!)', closeWith:'(!(`)!)'}, + {separator:'---------------'}, + {name:'Preview', call:'preview', className:"preview"} + ] +} + +// mIu nameSpace to avoid conflict. +miu = { + markdownTitle: function(markItUp, char) { + heading = ''; + n = $.trim(markItUp.selection||markItUp.placeHolder).length; + for(i = 0; i < n; i++) { + heading += char; + } + return '\n'+heading; + } +} \ No newline at end of file diff --git a/chrome_point_plus/js/options.js b/chrome_point_plus/js/options.js index 4b4f601..d158ee5 100644 --- a/chrome_point_plus/js/options.js +++ b/chrome_point_plus/js/options.js @@ -13,6 +13,10 @@ function save_options() { var checkbox_layout_fluid = document.getElementById('option-layout-fluid'); // Load original images var checkbox_images_load_original = document.getElementById('option-images-load-original'); + // Visual editor for posts + var checkbox_visual_editor_post = document.getElementById('option-visual-editor-post'); + // Google search + var checkbox_search_with_google = document.getElementById('option-search-with-google'); // Saving parameters chrome.storage.sync.set({ @@ -21,7 +25,9 @@ function save_options() { 'option_fancybox_videos': checkbox_fancybox_videos.checked, 'option_fancybox_posts': checkbox_fancybox_posts.checked, 'option_fluid_layout': checkbox_layout_fluid.checked, - 'option_images_load_original': checkbox_images_load_original.checked + 'option_images_load_original': checkbox_images_load_original.checked, + 'option_visual_editor_post': checkbox_visual_editor_post.checked, + 'option_search_with_google': checkbox_search_with_google.checked }, function() { // Update status to let user know options were saved. var status = document.getElementById('status'); @@ -35,7 +41,8 @@ function save_options() { // Restores select box state to saved value from localStorage. function restore_options() { // Loading options - chrome.storage.sync.get(['option_fancybox_images', 'option_fancybox_videos', 'option_fancybox_posts', 'option_ctrl_enter', 'option_images_load_original', 'option_fluid_layout'], function(options) { + chrome.storage.sync.get(['option_fancybox_images', 'option_fancybox_videos', 'option_fancybox_posts', 'option_ctrl_enter', 'option_images_load_original', + 'option_fluid_layout', 'option_visual_editor_post', 'option_search_with_google'], function(options) { // CTRL+Enter if (options.option_ctrl_enter == true) { document.getElementById('option-ctrl-enter').checked = true; @@ -61,6 +68,14 @@ function restore_options() { 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; + } }); } document.addEventListener('DOMContentLoaded', restore_options); diff --git a/chrome_point_plus/js/point-plus.js b/chrome_point_plus/js/point-plus.js index c9bce50..8530dce 100644 --- a/chrome_point_plus/js/point-plus.js +++ b/chrome_point_plus/js/point-plus.js @@ -1,6 +1,7 @@ $(document).ready(function() { // Loading options - chrome.storage.sync.get(['option_fancybox_images', 'option_fancybox_videos', 'option_fancybox_posts', 'option_ctrl_enter', 'option_fluid_layout', 'option_images_load_original'], function(options) { + chrome.storage.sync.get(['option_fancybox_images', 'option_fancybox_videos', 'option_fancybox_posts', 'option_ctrl_enter', 'option_fluid_layout', + 'option_images_load_original', 'option_visual_editor_post', 'option_search_with_google'], function(options) { // Fancybox // Images if (options.option_fancybox_images == true) { @@ -52,10 +53,11 @@ $(document).ready(function() { // Look and feel // Fluid #main layout if (options.option_fluid_layout == true) { - $('#main').css({ + $('#main, #header, #subheader, #footer').css({ 'width': '95%', 'max-width': '95%' }); + // TODO: fix #main #left-menu #top-link position } // Image resizing if (options.option_images_load_original == true) { @@ -72,6 +74,22 @@ $(document).ready(function() { 'max-height': '100%' }); } + // WYSIWYG editor + if (options.option_visual_editor_post == true) { + // Add classes + $('#new-post-form #text-input, .post-content #text-input').addClass('markitup').css('height', '20em'); + // Init + $('.markitup').markItUp(mySettings); + } + // Google search + if (options.option_search_with_google == true) { + $('#search-form input[type="text"]').attr('placeholder', 'Google').keydown(function(e) { + if (e.keyCode == 10 || e.keyCode == 13) { + e.preventDefault(); + document.location.href = '//www.google.ru/search?q=site%3Apoint.im+' + $(this).val(); + } + }); + } }); // Showing page action diff --git a/chrome_point_plus/manifest.json b/chrome_point_plus/manifest.json index c9c6d9a..3b0b76c 100644 --- a/chrome_point_plus/manifest.json +++ b/chrome_point_plus/manifest.json @@ -24,20 +24,31 @@ }, "content_scripts": [ { - "matches": ["http://*.point.im/*"], - "js": ["js/jquery-1.10.1.min.js", "js/jquery.fancybox.pack.js", "js/jquery.fancybox-media.js", "js/point-plus.js"], - "css": ["css/jquery.fancybox.css"], + "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/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" } ], "web_accessible_resources": [ - "images/*" + "images/*", + "includes/*" ], "background": { "scripts": ["js/background.js"] }, "permissions": [ "http://*.point.im/*", + "https://*.point.im/*", "storage", "tabs" ] diff --git a/chrome_point_plus/options.html b/chrome_point_plus/options.html index 5a2eaa2..854f45b 100644 --- a/chrome_point_plus/options.html +++ b/chrome_point_plus/options.html @@ -25,6 +25,12 @@

    +

    +

    +

    +