├── .gitignore ├── LICENSES ├── edit.php ├── include ├── css │ ├── edit.css │ ├── login.css │ └── prism.css ├── install.php ├── js │ ├── edit.js │ └── prism.js ├── note.php ├── sql.php └── user.php ├── index.php ├── login.php ├── notebook.php ├── readme.md └── user.php /.gitignore: -------------------------------------------------------------------------------- 1 | #过滤自动生成的伪静态配置文件 2 | .htaccess 3 | 4 | #过滤自动生成的配置文件 5 | config.php 6 | -------------------------------------------------------------------------------- /LICENSES: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /edit.php: -------------------------------------------------------------------------------- 1 | 16 |
17 | 21 |
22 |
23 | 24 |
25 | 29 |
30 | 34 |
35 | 36 | New Note 37 |
38 |
42 |
43 |
44 | 45 | New Note 46 |
47 |
48 | 49 | New Notebook 50 |
51 | 56 | 57 | 58 | 59 | 60 | 61 | MarkNote 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 98 | 99 | 100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 | 112 |
113 |
# Welcome to Marknote 114 | 115 | Please select a __note__ in the list on the left.
116 |
117 |
118 |
119 |
120 |
121 | 122 |
123 |
Open
124 |
Rename
125 |
Clone
126 | 127 | 128 |
Delete
129 |
Properties
130 |
131 | 132 |
133 |
Open
134 |
Rename
135 |
Clone
136 |
Share
137 |
Delete
138 |
139 | 140 |
141 | 154 | 155 | 156 | 157 |
158 | 159 | 160 | 161 | 162 | -------------------------------------------------------------------------------- /include/css/edit.css: -------------------------------------------------------------------------------- 1 | /* CSS for /edit.php */ 2 | 3 | 4 | body{ 5 | background: #191919; 6 | margin: 0; 7 | font-family: Noto Sans CJK SC,Microsoft Yahei,Hiragino Sans GB,WenQuanYi Micro Hei,sans-serif; 8 | line-height: 1.5; 9 | color: #fff; 10 | font-size: 14px; 11 | /*overflow: hidden;*/ 12 | } 13 | 14 | a{ 15 | color: #3498DB; 16 | text-decoration: none; 17 | } 18 | img{ 19 | max-width: 100%; 20 | } 21 | 22 | h1,h2,h3{ 23 | font-weight: 400; 24 | margin: 0; 25 | } 26 | 27 | * { 28 | -webkit-box-sizing: border-box; 29 | -moz-box-sizing: border-box; 30 | box-sizing: border-box; 31 | } 32 | 33 | :focus { 34 | border: none; 35 | outline: 0; 36 | } 37 | ::selection { 38 | background:#3498DB; 39 | color:#fff; 40 | } 41 | ::-moz-selection { 42 | background:#3498DB; 43 | color:#fff; 44 | } 45 | ::-webkit-selection { 46 | background:#3498DB; 47 | color:#fff; 48 | } 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | #header{ 60 | height: 56px; 61 | width: 100%; 62 | background-color: #000; 63 | } 64 | 65 | #header-title{ 66 | display: inline-block; 67 | font-size: 24px; 68 | border: 0; 69 | padding: 12px 24px; 70 | cursor: pointer; 71 | margin-top: -3px; 72 | /*color: #5AAAFA;*/ 73 | } 74 | 75 | #header-user{ 76 | display: inline-block; 77 | float: right; 78 | width: 240px; 79 | padding: 10px; 80 | } 81 | 82 | #header-user-head{ 83 | float: left; 84 | width: 36px; 85 | height: 36px; 86 | margin-right: 8px; 87 | border: 2px solid #fff; 88 | border-radius: 50%; 89 | overflow: hidden; 90 | } 91 | 92 | #header-user-name{ 93 | display: block; 94 | margin-top: -3px; 95 | font-size: 16px; 96 | } 97 | 98 | #header-user-emailandlogout{ 99 | display: block; 100 | margin-top: -2px; 101 | font-size: 11px; 102 | } 103 | 104 | #content{ 105 | width: 100%; 106 | height: 100%; 107 | background-color: #121212; 108 | } 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | #toolbar{ 120 | position: absolute; 121 | width: 48px; 122 | height: 100%; 123 | background-color: #1D1D1D; 124 | overflow-x: hidden; 125 | overflow-y: auto; 126 | } 127 | 128 | .toolbar-icon{ 129 | width: 48px; 130 | height: 48px; 131 | padding: 12px 16px; 132 | cursor: pointer; 133 | } 134 | 135 | .toolbar-icon span{ 136 | font-size: 18px; 137 | } 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | #sidebar{ 149 | position: absolute; 150 | left: 48px; 151 | width: 240px; 152 | height: 100%; 153 | background-color: #121212; 154 | overflow: auto; 155 | } 156 | 157 | #sidebar-status{ 158 | height: 32px; 159 | padding: 4px 15px; 160 | background-color: #181818; 161 | } 162 | 163 | #sidebar-status-icon{ 164 | margin-left: 5px; 165 | color: #f1c40f; 166 | } 167 | 168 | .notelist-item{ 169 | padding: 5px 10px 5px 35px; 170 | height: 32px; 171 | cursor: default; 172 | overflow: hidden; 173 | white-space: nowrap; 174 | } 175 | 176 | .notelist-item:hover, .notelist-item-contextmenu-show{ 177 | background-color: rgba(0,127,200,0.6); 178 | } 179 | 180 | .notelist-item i{ 181 | margin-right: 5px; 182 | } 183 | 184 | .notelist-item-moving{ 185 | background-color: #333; 186 | } 187 | 188 | .notelist-item-selected{ 189 | padding: 5px 10px 5px 30px; 190 | border-left: 5px solid #007FDC; 191 | background-color: #282828; 192 | } 193 | 194 | .notelist-item-selected:hover{ 195 | background-color: #282828; 196 | } 197 | 198 | .notelist-item-selected2{ 199 | background-color: #007FDC; 200 | } 201 | 202 | .notelist-item-selected2:hover{ 203 | background-color: #007FDC; 204 | } 205 | 206 | .notelist-item-subnote, .notelist-item-subnote2{ 207 | padding: 5px 10px 5px 55px; 208 | } 209 | 210 | .notelist-folder{ 211 | position: relative; 212 | overflow: hidden; 213 | } 214 | 215 | .i-notelist-folder-arrow{ 216 | position: absolute; 217 | left: 16px; 218 | top: 9px; 219 | } 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | #editor{ 231 | position: absolute; 232 | left: 288px; 233 | overflow: hidden; 234 | } 235 | 236 | #editor-ace, #editor-move, #editor-show{ 237 | display: inline-block; 238 | position: absolute; 239 | height: 100%; 240 | } 241 | 242 | #editor-ace{ 243 | font: 14px 'Source Code Pro', 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace; 244 | line-height: 1.3; 245 | } 246 | 247 | .ace_scroller{ 248 | background: #222222; 249 | } 250 | 251 | .ace-tomorrow-night-eighties .ace_marker-layer .ace_selection { 252 | background: #666 !important; 253 | } 254 | 255 | .ace_br1, .ace_br2, .ace_br3, .ace_br4, .ace_br5, .ace_br6, .ace_br7, .ace_br8, .ace_br9, .ace_br10, .ace_br11, .ace_br12, .ace_br13, .ace_br14, .ace_br15{ 256 | border-radius: 0px !important; 257 | } 258 | 259 | #editor-move{ 260 | width: 5px; 261 | background-color: #191919; 262 | cursor: ew-resize; 263 | } 264 | 265 | #editor-show{ 266 | padding: 20px; 267 | overflow: auto; 268 | } 269 | 270 | #editor-show p{ 271 | margin: 5px 0 12px 0; 272 | } 273 | #editor-show h1{ 274 | margin-bottom: 10px; 275 | } 276 | #editor-show h2{ 277 | border-bottom:solid 2px #ddd; 278 | margin-bottom: 5px; 279 | padding-bottom: 2px; 280 | } 281 | #editor-show blockquote{ 282 | border-left: 5px solid #ccc; 283 | padding: 5px 0 1px 10px; 284 | margin: 16px 0; 285 | background-color: #F2F2F5; 286 | } 287 | #editor-show pre{ 288 | border-left: 5px solid #666; 289 | margin: 5px 0; 290 | padding: 5px 15px; 291 | background-color: #333; 292 | font-family: "Source Code Pro","Menlo","Liberation Mono","Consolas","DejaVu Sans Mono","Ubuntu Mono","Courier New","andale mono","lucida console",monospace !important; 293 | border-radius: 0; 294 | } 295 | #editor-show pre code{ 296 | overflow: auto; 297 | background-color: #333; 298 | margin: 0; 299 | padding: 0; 300 | } 301 | #editor-show hr{ 302 | border: 1px solid #888; 303 | } 304 | #editor-show .MJXc-display,#editor-show .MJXp-display{ 305 | padding: 10px 0; 306 | background-color: #333; 307 | display: block; 308 | } 309 | #editor-show .MJXp-display{ 310 | font-size: 14px !important; 311 | } 312 | #editor-show code{ 313 | text-shadow: none; 314 | background-color: #353535; 315 | padding: 2px 6px 1px 6px; 316 | margin: 0 2px; 317 | font-size: 14px; 318 | font-family: "Source Code Pro","Menlo","Liberation Mono","Consolas","DejaVu Sans Mono","Ubuntu Mono","Courier New","andale mono","lucida console",monospace !important; 319 | } 320 | #editor-show .checkbox-checked{ 321 | width: 24px; 322 | display:inline-block; 323 | height:24px; 324 | background:transparent url('//cdn.bootcss.com/iCheck/1.0.1/skins/square/blue.png') no-repeat scroll 0% 0%; 325 | background-position:-48px 0; 326 | margin-bottom: -7px; 327 | } 328 | #editor-show .checkbox-notchecked{ 329 | width: 24px; 330 | display:inline-block; 331 | height:24px; 332 | background:transparent url('//cdn.bootcss.com/iCheck/1.0.1/skins/square/blue.png') no-repeat scroll 0% 0%; 333 | background-position:-24px 0; 334 | margin-bottom: -7px; 335 | } 336 | pre[class*=language-]>code[data-language]::before{ 337 | border-radius: 0 !important; 338 | } 339 | 340 | #editor-show-preprocess{ 341 | display: none; 342 | } 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | .contextmenu{ 354 | z-index: 100; 355 | display: none; 356 | position: fixed; 357 | top: 0; 358 | left: 0; 359 | width: 180px; 360 | /*padding: 5px 0;*/ 361 | background-color: #333; 362 | box-shadow: 0 3px 6px 0px rgba(0,0,0,0.16); 363 | } 364 | 365 | .contextmenu i{ 366 | margin-right: 6px; 367 | width: 14px; 368 | } 369 | 370 | .contextmenu-item{ 371 | padding: 6px 12px; 372 | width: 180px; 373 | cursor: default; 374 | } 375 | 376 | .contextmenu-item:hover{ 377 | background-color: #007FDC; 378 | } 379 | 380 | #float-input{ 381 | position: absolute; 382 | display: none; 383 | border: 0; 384 | } 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | #page-glass{ 396 | display: none; 397 | position: fixed; 398 | top: 0; 399 | left: 0; 400 | width: 100%; 401 | height: 100%; 402 | z-index: 100; 403 | background-color: rgba(0,0,0,0.4); 404 | } 405 | 406 | #sidebar-properties{ 407 | display: none; 408 | position: fixed; 409 | top: 0; 410 | left: 2000px; 411 | height: 100%; 412 | width: 300px; 413 | z-index: 101; 414 | background-color: #151515; 415 | box-shadow: -1px 0px 5px 0px rgba(0,0,0,0.3); 416 | } 417 | 418 | #sidebar-properties-header{ 419 | height: 80px; 420 | width: 100%; 421 | padding: 19px 20px; 422 | } 423 | 424 | #sidebar-properties-header i{ 425 | float: left; 426 | margin-right: 10px 427 | } 428 | 429 | #sidebar-properties-header-notename{ 430 | display: block; 431 | font-size: 18px; 432 | } 433 | 434 | #sidebar-properties-header-notetype{ 435 | display: block; 436 | margin-top: -4px; 437 | font-size: 12px; 438 | } 439 | 440 | #sidebar-properties-body{ 441 | padding: 0 20px; 442 | } 443 | 444 | .sidebar-properties-body-lable{ 445 | display: inline-block; 446 | width: 100px; 447 | } 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | #float-notsaved-lable{ 459 | display: none; 460 | position: absolute; 461 | font-size: 8px; 462 | color: #007FDC; 463 | top: 58px; 464 | left: 294px; 465 | z-index: 100; 466 | } 467 | -------------------------------------------------------------------------------- /include/css/login.css: -------------------------------------------------------------------------------- 1 | body{ 2 | background: #191919; 3 | margin: 0; 4 | font-family: Noto Sans CJK SC,Microsoft Yahei,Hiragino Sans GB,WenQuanYi Micro Hei,sans-serif; 5 | line-height: 27px; 6 | color: #fff; 7 | font-size: 14px; 8 | max-width: 460px; 9 | margin: 20px auto; 10 | } 11 | 12 | a{ 13 | color: #3498DB; 14 | text-decoration: none; 15 | } 16 | img{ 17 | max-width: 100%; 18 | } 19 | 20 | h1,h2,h3{ 21 | font-weight: 400; 22 | margin: 0; 23 | } 24 | 25 | * { 26 | -webkit-box-sizing: border-box; 27 | -moz-box-sizing: border-box; 28 | box-sizing: border-box; 29 | } 30 | 31 | :focus { 32 | border: none; 33 | outline: 0; 34 | } 35 | ::selection { 36 | background:#3498DB; 37 | color:#fff; 38 | } 39 | ::-moz-selection { 40 | background:#3498DB; 41 | color:#fff; 42 | } 43 | ::-webkit-selection { 44 | background:#3498DB; 45 | color:#fff; 46 | } 47 | 48 | .input-text{ 49 | display: block; 50 | font-size: 20px; 51 | padding: 10px; 52 | border: 0; 53 | background-color: #333; 54 | width: 460px; 55 | margin-bottom: 30px; 56 | color: #fff; 57 | } 58 | 59 | .input-text:focus{ 60 | background-color: #3f3f3f; 61 | } 62 | 63 | .input-btn{ 64 | display: block; 65 | padding: 18px 0; 66 | width: 260px; 67 | margin: 60px auto 20px auto; 68 | font-size: 18px; 69 | color: #222; 70 | border: 0; 71 | background-color: #5AAAFA; 72 | cursor: pointer; 73 | } 74 | 75 | .input-btn:hover{ 76 | background-color: #6BBBFB; 77 | } 78 | 79 | .title{ 80 | font-size: 25px; 81 | text-align: center; 82 | margin: 60px 0 40px 0; 83 | } 84 | -------------------------------------------------------------------------------- /include/css/prism.css: -------------------------------------------------------------------------------- 1 | /* http://prismjs.com/download.html?themes=prism-okaidia&languages=markup+css+clike+javascript+bash+c+csharp+cpp+ruby+css-extras+diff+docker+git+glsl+go+haskell+http+icon+ini+java+json+latex+less+lua+makefile+markdown+matlab+objectivec+perl+php+php-extras+powershell+python+r+rust+sas+scheme+sql+vim+yaml&plugins=line-highlight+line-numbers */ 2 | /** 3 | * okaidia theme for JavaScript, CSS and HTML 4 | * Loosely based on Monokai textmate theme by http://www.monokai.nl/ 5 | * @author ocodia 6 | */ 7 | 8 | code[class*="language-"], 9 | pre[class*="language-"] { 10 | color: #f8f8f2; 11 | background: none; 12 | text-shadow: 0 1px rgba(0, 0, 0, 0.3); 13 | font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; 14 | text-align: left; 15 | white-space: pre; 16 | word-spacing: normal; 17 | word-break: normal; 18 | word-wrap: normal; 19 | line-height: 1.5; 20 | 21 | -moz-tab-size: 4; 22 | -o-tab-size: 4; 23 | tab-size: 4; 24 | 25 | -webkit-hyphens: none; 26 | -moz-hyphens: none; 27 | -ms-hyphens: none; 28 | hyphens: none; 29 | } 30 | 31 | /* Code blocks */ 32 | pre[class*="language-"] { 33 | padding: 1em; 34 | margin: .5em 0; 35 | overflow: auto; 36 | border-radius: 0.3em; 37 | } 38 | 39 | :not(pre) > code[class*="language-"], 40 | pre[class*="language-"] { 41 | background: #272822; 42 | } 43 | 44 | /* Inline code */ 45 | :not(pre) > code[class*="language-"] { 46 | padding: .1em; 47 | border-radius: .3em; 48 | white-space: normal; 49 | } 50 | 51 | .token.comment, 52 | .token.prolog, 53 | .token.doctype, 54 | .token.cdata { 55 | color: slategray; 56 | } 57 | 58 | .token.punctuation { 59 | color: #f8f8f2; 60 | } 61 | 62 | .namespace { 63 | opacity: .7; 64 | } 65 | 66 | .token.property, 67 | .token.tag, 68 | .token.constant, 69 | .token.symbol, 70 | .token.deleted { 71 | color: #f92672; 72 | } 73 | 74 | .token.boolean, 75 | .token.number { 76 | color: #ae81ff; 77 | } 78 | 79 | .token.selector, 80 | .token.attr-name, 81 | .token.string, 82 | .token.char, 83 | .token.builtin, 84 | .token.inserted { 85 | color: #a6e22e; 86 | } 87 | 88 | .token.operator, 89 | .token.entity, 90 | .token.url, 91 | .language-css .token.string, 92 | .style .token.string, 93 | .token.variable { 94 | color: #f8f8f2; 95 | } 96 | 97 | .token.atrule, 98 | .token.attr-value, 99 | .token.function { 100 | color: #e6db74; 101 | } 102 | 103 | .token.keyword { 104 | color: #66d9ef; 105 | } 106 | 107 | .token.regex, 108 | .token.important { 109 | color: #fd971f; 110 | } 111 | 112 | .token.important, 113 | .token.bold { 114 | font-weight: bold; 115 | } 116 | .token.italic { 117 | font-style: italic; 118 | } 119 | 120 | .token.entity { 121 | cursor: help; 122 | } 123 | 124 | pre[data-line] { 125 | position: relative; 126 | padding: 1em 0 1em 3em; 127 | } 128 | 129 | .line-highlight { 130 | position: absolute; 131 | left: 0; 132 | right: 0; 133 | padding: inherit 0; 134 | margin-top: 1em; /* Same as .prism’s padding-top */ 135 | 136 | background: hsla(24, 20%, 50%,.08); 137 | background: linear-gradient(to right, hsla(24, 20%, 50%,.1) 70%, hsla(24, 20%, 50%,0)); 138 | 139 | pointer-events: none; 140 | 141 | line-height: inherit; 142 | white-space: pre; 143 | } 144 | 145 | .line-highlight:before, 146 | .line-highlight[data-end]:after { 147 | content: attr(data-start); 148 | position: absolute; 149 | top: .4em; 150 | left: .6em; 151 | min-width: 1em; 152 | padding: 0 .5em; 153 | background-color: hsla(24, 20%, 50%,.4); 154 | color: hsl(24, 20%, 95%); 155 | font: bold 65%/1.5 sans-serif; 156 | text-align: center; 157 | vertical-align: .3em; 158 | border-radius: 999px; 159 | text-shadow: none; 160 | box-shadow: 0 1px white; 161 | } 162 | 163 | .line-highlight[data-end]:after { 164 | content: attr(data-end); 165 | top: auto; 166 | bottom: .4em; 167 | } 168 | 169 | pre.line-numbers { 170 | position: relative; 171 | padding-left: 3.8em; 172 | counter-reset: linenumber; 173 | } 174 | 175 | pre.line-numbers > code { 176 | position: relative; 177 | } 178 | 179 | .line-numbers .line-numbers-rows { 180 | position: absolute; 181 | pointer-events: none; 182 | top: 0; 183 | font-size: 100%; 184 | left: -3.8em; 185 | width: 3em; /* works for line-numbers below 1000 lines */ 186 | letter-spacing: -1px; 187 | border-right: 1px solid #999; 188 | 189 | -webkit-user-select: none; 190 | -moz-user-select: none; 191 | -ms-user-select: none; 192 | user-select: none; 193 | 194 | } 195 | 196 | .line-numbers-rows > span { 197 | pointer-events: none; 198 | display: block; 199 | counter-increment: linenumber; 200 | } 201 | 202 | .line-numbers-rows > span:before { 203 | content: counter(linenumber); 204 | color: #999; 205 | display: block; 206 | padding-right: 0.8em; 207 | text-align: right; 208 | } 209 | -------------------------------------------------------------------------------- /include/install.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | MarkNote › 安装 10 | 79 | 80 | 81 |
82 | 86 |

MarkNote安装向导

87 |

程序已安装过,若需要调整设置,请直接编辑程序目录下的config.php或删除该文件以重新安装。

88 | 89 | 97 | 98 |

MarkNote安装向导

99 |

欢迎使用MarkNote,本向导会在程序目录下生成config.php,您也可以根据config-sample.php来手动创建。

100 |

MarkNote需要一个可用的MySQL 5.x数据库,并建议启用mod_rewrite这一Apache模块。

101 | 102 |

请点击下一步以继续

103 | 104 | 下一步 > 105 |
106 | 107 | 108 | 115 | 116 |

MarkNote安装向导

117 |
118 |

数据库信息

119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 |
数据库主机
数据库用户
密码
数据库名
140 | 141 | 142 |

其他选项

143 | 144 | 145 | 146 | 147 | 148 |
启用伪静态
149 | 150 | 下一步 > 151 |
152 |
153 | 154 | 164 | RewriteEngine On 165 | RewriteRule ^([a-zA-Z0-9]+)$ index.php?type=user&user=$1 166 | RewriteRule ^([a-zA-Z0-9]+)/([a-zA-Z0-9]+)$ index.php?type=notebook&user=$1¬ebook=$2 167 | RewriteRule ^([a-zA-Z0-9]+)/([a-zA-Z0-9]+)/([a-zA-Z0-9]+)$ index.php?type=note&user=$1¬ebook=$2¬emane=$3 168 | 169 | ### MarkNote RewriteRule end 170 | "; 171 | file_put_contents('../.htaccess', $htaccess_file_content); 172 | } 173 | 174 | $sql_host = $_POST['sql-host']; 175 | $sql_user = $_POST['sql-user']; 176 | $sql_passwd = $_POST['sql-passwd']; 177 | $sql_name = $_POST['sql-name']; 178 | $enable_rewrite = $_POST['enable-rewrite']; 179 | 180 | $sql = new mysqli($sql_host, $sql_user, $sql_passwd, $sql_name); 181 | if( $sql->connect_errno ){ 182 | ?> 183 |

无法连接数据库,请检查你的设置。

184 |

Error: (connect_errno.') '.$sql->connect_error; ?>

185 | < 返回 186 | query('CREATE TABLE note_content ( 197 | ID int NOT NULL AUTO_INCREMENT, 198 | PRIMARY KEY(ID), 199 | user tinytext, 200 | settings text, 201 | content longtext, 202 | comments longtext 203 | ) DEFAULT CHARSET=utf8'); 204 | 205 | $sql->query('CREATE TABLE note_users ( 206 | UID int NOT NULL AUTO_INCREMENT, 207 | PRIMARY KEY(UID), 208 | username tinytext, 209 | passwd tinytext, 210 | email tinytext, 211 | settings text, 212 | notebooks longtext 213 | ) DEFAULT CHARSET=utf8'); 214 | 215 | 216 | $to_config_file= 217 | ''; 224 | 225 | 226 | $result = file_put_contents('../config.php', $to_config_file); 227 | if(!$result){ 228 | ?> 229 |

无法写入配置文件,请检查你的设置。

230 |

Error: (connect_errno.') '.$sql->connect_error; ?>

231 | < 返回 232 | 236 |

MarkNote安装向导

237 |

安装已完成

238 | 完成 239 |
240 | 247 | 248 |
249 | 250 | 251 | -------------------------------------------------------------------------------- /include/js/edit.js: -------------------------------------------------------------------------------- 1 | var NOTEID=0; 2 | 3 | function convertDate(unixTime){ 4 | var unixTimestamp = new Date(unixTime * 1000); 5 | var text = unixTimestamp.toLocaleString(); 6 | if(text == "Invalid Date"){ 7 | text = "Unknown" 8 | } 9 | return text; 10 | } 11 | 12 | 13 | function doLayout(){ 14 | var winh=window.innerHeight 15 | || document.documentElement.clientHeight 16 | || document.body.clientHeight; 17 | 18 | var winw=window.innerWidth 19 | || document.documentElement.clientWidth 20 | || document.body.clientWidth; 21 | 22 | $("#content").height(winh-56); 23 | $("#toolbar").height(winh-56); 24 | $("#sidebar").height(winh-56); 25 | $("#editor").height(winh-56); 26 | 27 | $("#editor").width(winw-288); 28 | 29 | document.getElementById("editor-move").style.left = (winw-240)/2 + "px"; 30 | document.getElementById("editor-ace").style.width = (winw-240)/2 + "px"; 31 | document.getElementById("editor-show").style.width = (winw-240)/2 - 53 + "px"; 32 | document.getElementById("editor-show").style.marginLeft = (winw-240)/2 + 5 + "px"; 33 | 34 | } 35 | 36 | window.onresize = function () { 37 | doLayout(); 38 | } 39 | 40 | function loadNotelist(){ 41 | $.post("edit.php",{ 42 | action:"getNotelist" 43 | }, 44 | function(data,status){ 45 | $("#sidebar-notelist").html(data); 46 | var notelist = document.getElementById("sidebar-notelist"); 47 | 48 | // list 1: notes in list 49 | Sortable.create(notelist, { 50 | group: { 51 | name: "notelist", 52 | put: ["notebooklist", "sublist"], 53 | pull:true 54 | }, 55 | ghostClass: 'notelist-item-moving', 56 | animation: 150, 57 | draggable: ".notelist-item-single", 58 | onSort: function(evt){ 59 | updateList(); 60 | } 61 | }); 62 | 63 | // list 2: notebooks in list 64 | Sortable.create(notelist, { 65 | group: { 66 | name: "notebooklist", 67 | put: ["notelist", "sublist"], 68 | pull:true 69 | }, 70 | ghostClass: 'notelist-item-moving', 71 | animation: 150, 72 | draggable: ".notelist-folder", 73 | onSort: function(evt){ 74 | updateList(); 75 | } 76 | }); 77 | 78 | // other lists: notes in each notebooks 79 | $("#sidebar-notelist .notelist-folder").each(function(){ 80 | Sortable.create(this, { 81 | group: { 82 | name: "sublist", 83 | put: ["notelist"], 84 | pull:true 85 | }, 86 | ghostClass: 'notelist-item-moving', 87 | animation: 150, 88 | draggable: ".notelist-item-subnote", 89 | onSort: function(evt){ 90 | updateList(); 91 | } 92 | }); 93 | }); 94 | 95 | $("#sidebar-notelist .notelist-item-single").each(function(){ 96 | this.oncontextmenu = function(event){ 97 | showNoteContext(this, event); 98 | return false; 99 | } 100 | }); 101 | $(".notelist-item-subnote").each(function(){ 102 | this.oncontextmenu = function(event){ 103 | showNoteContext(this, event); 104 | return false; 105 | } 106 | }); 107 | 108 | //re-select current note if has 109 | if(NOTEID){ 110 | $("#notelist-item-"+NOTEID).addClass("notelist-item-selected2"); 111 | if($("#notelist-item-"+NOTEID).hasClass("notelist-item-subnote")){ 112 | $("#notelist-item-"+NOTEID).parent().children(".notelist-item-notebook-title").addClass("notelist-item-selected"); 113 | } 114 | } 115 | }); 116 | } 117 | 118 | function updateList(){ 119 | theList = $("#sidebar-notelist"); 120 | 121 | theList.children(".notelist-item-subnote").addClass("notelist-item-single"); 122 | theList.children(".notelist-item-subnote").removeClass("notelist-item-subnote"); 123 | 124 | theList.children(".notelist-folder").children(".notelist-item-single").addClass("notelist-item-subnote"); 125 | theList.children(".notelist-folder").children(".notelist-item-single").removeClass("notelist-item-single"); 126 | 127 | if($("#notelist-item-"+NOTEID).hasClass("notelist-item-subnote")){ 128 | $("#notelist-item-"+NOTEID).parent().parent().children(".notelist-folder").children(".notelist-item-notebook-title").removeClass("notelist-item-selected"); 129 | $("#notelist-item-"+NOTEID).parent().children(".notelist-item-notebook-title").addClass("notelist-item-selected"); 130 | }else{ 131 | $("#notelist-item-"+NOTEID).parent().children(".notelist-folder").children(".notelist-item-notebook-title").removeClass("notelist-item-selected"); 132 | } 133 | 134 | newList = new Array(); 135 | 136 | theList.children().each(function(){ 137 | if( $(this).hasClass("notelist-item-single") ){ 138 | if($(this).attr("id")){ 139 | newList.push(parseInt( $(this).attr("id").substring(14) )); 140 | } 141 | } 142 | if( $(this).hasClass("notelist-folder") ){ 143 | tmp = new Array(); 144 | tmp.push( $(this).children(".notelist-item-notebook-title").text() ); 145 | $(this).children(".notelist-item-subnote").each(function(){ 146 | tmp.push(parseInt( $(this).attr("id").substring(14) )); 147 | }); 148 | newList.push(tmp); 149 | } 150 | }); 151 | 152 | newListJSON = JSON.stringify(newList); 153 | // alert(newListJSON); 154 | 155 | $.post("include/note.php",{ 156 | action:"updateNoteList", 157 | list:newListJSON 158 | }, 159 | function(data,status){ 160 | // alert("Status: " + status + data ); 161 | }); 162 | 163 | } 164 | 165 | function newNote(){ 166 | var newname = prompt(); 167 | if(newname == null){ 168 | return 1; 169 | } 170 | 171 | $.post("include/note.php",{ 172 | action:"newNote", 173 | title:newname 174 | }, 175 | function(data,status){ 176 | loadNotelist(); 177 | }); 178 | } 179 | 180 | function newNotebook(){ 181 | var newname = prompt(); 182 | if(newname == null){ 183 | return 1; 184 | } 185 | 186 | $.post("include/note.php",{ 187 | action:"newNotebook", 188 | notebook:newname 189 | }, 190 | function(data,status){ 191 | loadNotelist(); 192 | }); 193 | } 194 | 195 | function newNoteBelow(){ 196 | var newname = prompt(); 197 | if(newname == null){ 198 | return 1; 199 | } 200 | 201 | $.post("include/note.php",{ 202 | action:"newNoteBelow", 203 | id:NOTEID, 204 | title:newname 205 | }, 206 | function(data,status){ 207 | loadNotelist(); 208 | }); 209 | } 210 | 211 | function newSubnote(notebook){ 212 | var newname = prompt(); 213 | if(newname == null){ 214 | return 1; 215 | } 216 | 217 | $.post("include/note.php",{ 218 | action:"newSubnote", 219 | notebook:notebook, 220 | title:newname 221 | }, 222 | function(data,status){ 223 | loadNotelist(); 224 | }); 225 | } 226 | 227 | function loadNote(id){ 228 | updateStatusBar("#f1c40f", "Loading note..."); 229 | if(NOTEID){ 230 | if(NOTEID == id){ 231 | updateStatusBar("#0f2", "Note loaded"); 232 | return 0; 233 | } 234 | $("#notelist-item-"+NOTEID).removeClass("notelist-item-selected2"); 235 | if($("#notelist-item-"+NOTEID).hasClass("notelist-item-subnote")){ 236 | if( $("#notelist-item-"+NOTEID).parent() != $("#notelist-item-"+id).parent() ){ 237 | $("#notelist-item-"+NOTEID).parent().children(".notelist-item-notebook-title").removeClass("notelist-item-selected"); 238 | } 239 | } 240 | } 241 | NOTEID=id; 242 | $("#notelist-item-"+NOTEID).addClass("notelist-item-selected2"); 243 | if($("#notelist-item-"+NOTEID).hasClass("notelist-item-subnote")){ 244 | $("#notelist-item-"+NOTEID).parent().children(".notelist-item-notebook-title").addClass("notelist-item-selected"); 245 | } 246 | NoteLoding=true; 247 | $.post("include/note.php",{ 248 | action:"getNote", 249 | id:id 250 | }, 251 | function(data,status){ 252 | // alert("Status: " + status + data ); 253 | EditorAce.session.setValue(data); 254 | updateEditorShow(); 255 | updateStatusBar("#0f2", "Note loaded"); 256 | NoteLoding=false; 257 | }); 258 | } 259 | 260 | function getNoteSettings(id){ 261 | updateStatusBar("#f1c40f", "Loading properties..."); 262 | $.post("include/note.php",{ 263 | action:"getNoteSettings", 264 | id:id 265 | }, 266 | function(data,status){ 267 | updateStatusBar("#0f2", "Properties loaded"); 268 | showProperties(id, data); 269 | }); 270 | } 271 | 272 | function renameNote(id){ 273 | var newname; 274 | notebook = $("#notelist-item-"+id); 275 | newname = prompt(); 276 | if(newname == null){ 277 | return 1; 278 | } 279 | 280 | updateStatusBar("#f1c40f", "Rename note..."); 281 | $.post("include/note.php",{ 282 | action:"renameNote", 283 | newname:newname, 284 | id:id 285 | }, 286 | function(data,status){ 287 | // alert("Status: " + status + data ); 288 | loadNotelist(); 289 | updateStatusBar("#0f2", "Note Renamed"); 290 | }); 291 | } 292 | 293 | 294 | var NoteAutosaving = false; 295 | var NoteAutosaveWaiting = false; 296 | function autosaveNote(){ 297 | if(NOTEID){ 298 | if(!NoteAutosaving){ 299 | NoteAutosaving = true; 300 | setTimeout(function(){ 301 | NoteAutosaving = false; 302 | if(NoteAutosaveWaiting){ 303 | NoteAutosaveWaiting = false; 304 | autosaveNote(); 305 | } 306 | }, 500); 307 | updateStatusBar("#f1c40f", "Saving..."); 308 | $.post("include/note.php",{ 309 | action:"saveNote", 310 | id:NOTEID, 311 | content:EditorAce.getValue() 312 | }, 313 | function(data,status){ 314 | // alert("Status: " + status + data ); 315 | hideNotsaveLable(); 316 | updateStatusBar("#0f2", "Note saved"); 317 | }); 318 | }else{ 319 | NoteAutosaveWaiting = true; 320 | } 321 | } 322 | } 323 | 324 | function saveNote(){ 325 | if(NOTEID){ 326 | updateStatusBar("#f1c40f", "Saving..."); 327 | $.post("include/note.php",{ 328 | action:"saveNote", 329 | id:NOTEID, 330 | content:EditorAce.getValue() 331 | }, 332 | function(data,status){ 333 | // alert("Status: " + status + data ); 334 | hideNotsaveLable(); 335 | updateStatusBar("#0f2", "Note saved"); 336 | }); 337 | } 338 | } 339 | 340 | function cloneNote(id){ 341 | updateStatusBar("#f1c40f", "Cloning..."); 342 | $.post("include/note.php",{ 343 | action:"cloneNote", 344 | id:id 345 | }, 346 | function(data,status){ 347 | // alert("Status: " + status + data ); 348 | loadNotelist(); 349 | updateStatusBar("#0f2", "Note cloned"); 350 | }); 351 | } 352 | 353 | 354 | function delNote(id){ 355 | $.post("include/note.php",{ 356 | action:"delNote", 357 | id:id 358 | }, 359 | function(data,status){ 360 | // alert("Status: " + status + data ); 361 | loadNotelist(); 362 | }); 363 | } 364 | 365 | function delNotebook(notebook){ 366 | $.post("include/note.php",{ 367 | action:"delNotebook", 368 | notebook:notebook 369 | }, 370 | function(data,status){ 371 | // alert("Status: " + status + data ); 372 | loadNotelist(); 373 | }); 374 | } 375 | 376 | function showNotebookDelIcon(item){ 377 | if($(item).parent().children(".notelist-item").size()==2){ 378 | // $(item).find(".i-notelist-item-del").show(); 379 | } 380 | } 381 | 382 | function hideNotebookDelIcon(item){ 383 | $(item).find(".i-notelist-item-del").hide(); 384 | } 385 | 386 | function toggleNotebook(item){ 387 | 388 | if($(item).hasClass("notebook-opened")){ 389 | $(item).parent().animate({height:"32px"}); 390 | $(item).parent().children("i").animate({rotation: -90}); 391 | }else{ 392 | $(item).parent().animate({height:$(item).parent().children(".notelist-item").size()*32+"px" }); 393 | $(item).parent().children("i").animate({rotation: 0}); 394 | } 395 | $(item).toggleClass("notebook-opened"); 396 | } 397 | 398 | function showProperties(id, notesettings){ 399 | var winh=window.innerHeight 400 | || document.documentElement.clientHeight 401 | || document.body.clientHeight; 402 | 403 | var winw=window.innerWidth 404 | || document.documentElement.clientWidth 405 | || document.body.clientWidth; 406 | 407 | notesettings = JSON.parse(notesettings); 408 | $("#sidebar-properties-header-notename").html(notesettings['title']); 409 | $("#sidebar-properties-header-notetype").html("Markdown Note"); 410 | 411 | $("#sidebar-properties-body-name").html(notesettings['title']); 412 | $("#sidebar-properties-body-lastmodify").html(convertDate(notesettings['lastmodify'])); 413 | $("#sidebar-properties-body-lastaccess").html(convertDate(notesettings['lastaccess'])); 414 | 415 | $("#sidebar-properties").css("left", winw+'px'); 416 | $("#sidebar-properties").show(function(){ 417 | $("#sidebar-properties").animate({left: winw-300+'px'},200); 418 | $("#page-glass").fadeIn(200); 419 | }); 420 | 421 | } 422 | 423 | function hideProperties(){ 424 | var winh=window.innerHeight 425 | || document.documentElement.clientHeight 426 | || document.body.clientHeight; 427 | 428 | var winw=window.innerWidth 429 | || document.documentElement.clientWidth 430 | || document.body.clientWidth; 431 | $("#sidebar-properties").animate({left: winw+'px'},200,function(){ 432 | $("#sidebar-properties").hide(); 433 | }); 434 | $("#page-glass").fadeOut(200); 435 | 436 | } 437 | 438 | function showNotsaveLable(){ 439 | if(NOTEID){ 440 | $("#float-notsaved-lable").show(); 441 | } 442 | } 443 | 444 | function hideNotsaveLable(){ 445 | $("#float-notsaved-lable").hide(); 446 | } 447 | 448 | var EditorShowProcessing = false; 449 | var EditorShowWaiting = false; 450 | function updateEditorShow(){ 451 | if(!EditorShowProcessing){ 452 | EditorShowProcessing = true; 453 | 454 | document.getElementById("editor-show-preprocess").innerHTML = marked(EditorAce.getValue()); 455 | Prism.highlightAll(); 456 | 457 | MathJax.Hub.Queue(["Typeset",MathJax.Hub,"editor-show-preprocess"], function(){ 458 | document.getElementById("editor-show").innerHTML = document.getElementById("editor-show-preprocess").innerHTML; 459 | EditorShowProcessing = false; 460 | if(EditorShowWaiting){ 461 | updateEditorShow(); 462 | EditorShowWaiting = false; 463 | } 464 | }); 465 | }else{ 466 | EditorShowWaiting = true; 467 | } 468 | 469 | } 470 | 471 | function updateStatusBar(color, text){ 472 | document.getElementById("sidebar-status-icon").style.color = color; 473 | document.getElementById("sidebar-status-text").innerHTML = text; 474 | } 475 | 476 | var noteContextID = 0; 477 | function showNoteContext(item, event){ 478 | var e = event || window.event; 479 | var context = $("#contextmenu-1"); 480 | if(noteContextID){ 481 | $("#notelist-item-"+noteContextID).removeClass("notelist-item-contextmenu-show"); 482 | noteContextID = 0; 483 | } 484 | context.hide(); 485 | context.show(150); 486 | $("#contextmenu-1").css({ 487 | "top" : e.clientY+'px', 488 | "left" : e.clientX+'px' 489 | }); 490 | noteContextID = parseInt($(item).attr("id").substring(14)); 491 | $(item).addClass("notelist-item-contextmenu-show"); 492 | } 493 | 494 | function noteContextClick(operation){ 495 | switch(operation){ 496 | case "open": 497 | loadNote(noteContextID); 498 | break; 499 | case "rename": 500 | renameNote(noteContextID); 501 | break; 502 | case "clone": 503 | cloneNote(noteContextID); 504 | break; 505 | case "share": 506 | 507 | break; 508 | case "export": 509 | 510 | break; 511 | case "delete": 512 | if(confirm("Delete this note?")){ 513 | delNote(noteContextID); 514 | } 515 | break; 516 | case "properties": 517 | getNoteSettings(noteContextID); 518 | break; 519 | } 520 | $("#contextmenu-1").hide(150); 521 | if(noteContextID){ 522 | $("#notelist-item-"+noteContextID).removeClass("notelist-item-contextmenu-show"); 523 | noteContextID = 0; 524 | } 525 | } 526 | 527 | 528 | var EditorAce; 529 | var NoteLoding=false; 530 | $(document).ready(function(){ 531 | loadNotelist(); 532 | doLayout(); 533 | updateStatusBar("#bdc3c7", "Ready"); 534 | 535 | $("#btn-newnote").click(function(){ 536 | $.post("include/note.php",{ 537 | action:"newNote", 538 | title:$("#input-newnote").val() 539 | }, 540 | function(data,status){ 541 | // alert("Status: " + status + data ); 542 | loadNotelist(); 543 | }); 544 | }); 545 | 546 | $("#btn-newnotebook").click(function(){ 547 | $.post("include/note.php",{ 548 | action:"newNotebook", 549 | notebook:$("#input-newnotebook").val() 550 | }, 551 | function(data,status){ 552 | // alert("Status: " + status + data ); 553 | loadNotelist(); 554 | }); 555 | }); 556 | 557 | $("#btn-subnote").click(function(){ 558 | $.post("include/note.php",{ 559 | action:"newSubnote", 560 | notebook:$("#input-subnote-book").val(), 561 | title:$("#input-subnote-note").val() 562 | }, 563 | function(data,status){ 564 | // alert("Status: " + status + data ); 565 | loadNotelist(); 566 | }); 567 | }); 568 | 569 | document.onclick=function(event){ 570 | var e = event || window.event; 571 | var doHide = true; 572 | $(".contextmenu").each(function(){ 573 | contextmenuPos = $(this).offset(); 574 | if( contextmenuPos.left <= e.clientX && e.clientX <= contextmenuPos.left+$(this).width() && 575 | contextmenuPos.top <= e.clientY && e.clientY <= contextmenuPos.top+$(this).height() ){ 576 | doHide = false; 577 | } 578 | // alert(contextmenuPos.x+"px "+contextmenuPos.y+"px "+e.clientX+"px "+e.clientY+"px "); 579 | }); 580 | 581 | 582 | if(doHide){ 583 | if(noteContextID){ 584 | $("#notelist-item-"+noteContextID).removeClass("notelist-item-contextmenu-show"); 585 | noteContextID = 0; 586 | } 587 | $("#contextmenu-1").hide(150); 588 | } 589 | }; 590 | 591 | var oBox = document.getElementById("editor"), oLeft = document.getElementById("editor-ace"), oRight = document.getElementById("editor-show"), oMove = document.getElementById("editor-move"); 592 | oMove.onmousedown = function(e){ 593 | var winw=window.innerWidth 594 | || document.documentElement.clientWidth 595 | || document.body.clientWidth; 596 | var disX = (e || event).clientX; 597 | oMove.left = oMove.offsetLeft; 598 | document.onmousemove = function(e){ 599 | var iT = oMove.left + ((e || event).clientX - disX); 600 | var e=e||window.event,tarnameb=e.target||e.srcElement; 601 | oMove.style.margin = 0; 602 | iT < 100 && (iT = 100); 603 | iT > oBox.clientWidth - 100 && (iT = oBox.clientWidth - 100); 604 | oMove.style.left = iT + "px"; 605 | oLeft.style.width = iT + "px"; 606 | oRight.style.width = oBox.clientWidth - iT - 5 + "px"; 607 | oRight.style.marginLeft = iT + 5 + "px"; 608 | return false 609 | }; 610 | document.onmouseup = function(){ 611 | document.onmousemove = null; 612 | document.onmouseup = null; 613 | oMove.releaseCapture && oMove.releaseCapture(); 614 | EditorAce.resize(); 615 | }; 616 | oMove.setCapture && oMove.setCapture(); 617 | return false; 618 | }; 619 | 620 | //初始化ACE编辑器 621 | EditorAce = ace.edit("editor-ace"); 622 | EditorAce.setTheme("ace/theme/tomorrow_night_eighties"); 623 | EditorAce.getSession().setMode("ace/mode/markdown"); 624 | EditorAce.getSession().setUseWrapMode(true); 625 | updateEditorShow(); 626 | 627 | //ACE编辑器的内容改变事件 628 | EditorAce.getSession().on("change", function(e){ 629 | if(!NoteLoding){ 630 | updateEditorShow(); 631 | showNotsaveLable(); 632 | autosaveNote(); 633 | } 634 | }); 635 | 636 | MathJax.Hub.Config({ 637 | showProcessingMessages: false, 638 | elements: ["editor-show"] 639 | }); 640 | 641 | $(".ace_scrollbar-v").attr("id","editor-ace-scrollbar"); //给ACE编辑器的滚动条添加名称 642 | 643 | $("#editor-ace-scrollbar").scroll(function(){ 644 | var t = $(this)[0].scrollTop; //获取编辑区滚动值 645 | 646 | // 自动同步滚动算法: 647 | // 预览区滚动值 = 编辑区滚动值 * [ (预览区总滚动高度 - 预览区显示高度) / (编辑区总滚动高度 - 编辑区显示高度) ] 648 | document.getElementById("editor-show").scrollTop=t * (document.getElementById("editor-show").scrollHeight-document.getElementById("editor-show").offsetHeight) / (document.getElementById("editor-ace-scrollbar").scrollHeight-document.getElementById("editor-ace-scrollbar").offsetHeight); 649 | }); 650 | 651 | $(document).keydown(function(e){ 652 | if( e.ctrlKey && e.which == 83 ){ 653 | saveNote(); 654 | return false; 655 | } 656 | }); 657 | 658 | 659 | }); 660 | 661 | 662 | 663 | 664 | var matrixRegex = /(?:matrix\(|\s*,\s*)([-+]?[0-9]*\.?[0-9]+(?:[e][-+]?[0-9]+)?)/gi; 665 | var getMatches = function (string, regex) { 666 | regex || (regex = matrixRegex); 667 | var matches = [ 668 | ]; 669 | var match; 670 | while (match = regex.exec(string)) { 671 | matches.push(match[1]); 672 | } 673 | return matches; 674 | }; 675 | $.cssHooks["rotation"] = { 676 | get: function (elem) { 677 | var $elem = $(elem); 678 | var matrix = getMatches($elem.css("transform")); 679 | if (matrix.length != 6) { 680 | return 0; 681 | } 682 | return Math.atan2(parseFloat(matrix[1]), parseFloat(matrix[0])) * (180 / Math.PI); 683 | }, 684 | set: function (elem, val) { 685 | var $elem = $(elem); 686 | var deg = parseFloat(val); 687 | if (!isNaN(deg)) { 688 | $elem.css({ 689 | transform: "rotate(" + deg + "deg)" 690 | }); 691 | } 692 | } 693 | }; 694 | $.cssNumber.rotation = true; 695 | $.fx.step.rotation = function (fx) { 696 | $.cssHooks.rotation.set(fx.elem, fx.now + fx.unit); 697 | }; 698 | -------------------------------------------------------------------------------- /include/js/prism.js: -------------------------------------------------------------------------------- 1 | /* http://prismjs.com/download.html?themes=prism-okaidia&languages=markup+css+clike+javascript+bash+c+csharp+cpp+ruby+css-extras+diff+docker+git+glsl+go+haskell+http+icon+ini+java+json+latex+less+lua+makefile+markdown+matlab+objectivec+perl+php+php-extras+powershell+python+r+rust+sas+scheme+sql+vim+yaml&plugins=line-highlight+line-numbers */ 2 | var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(){var e=/\blang(?:uage)?-(\w+)\b/i,t=0,n=_self.Prism={util:{encode:function(e){return e instanceof a?new a(e.type,n.util.encode(e.content),e.alias):"Array"===n.util.type(e)?e.map(n.util.encode):e.replace(/&/g,"&").replace(/e.length)break e;if(!(v instanceof a)){u.lastIndex=0;var b=u.exec(v),k=1;if(!b&&h&&m!=r.length-1){if(u.lastIndex=y,b=u.exec(e),!b)break;for(var w=b.index+(g?b[1].length:0),_=b.index+b[0].length,A=m,S=y,P=r.length;P>A&&_>S;++A)S+=(r[A].matchedStr||r[A]).length,w>=S&&(++m,y=S);if(r[m]instanceof a||r[A-1].greedy)continue;k=A-m,v=e.slice(y,S),b.index-=y}if(b){g&&(f=b[1].length);var w=b.index+f,b=b[0].slice(f),_=w+b.length,x=v.slice(0,w),O=v.slice(_),j=[m,k];x&&j.push(x);var N=new a(l,c?n.tokenize(b,c):b,d,b,h);j.push(N),O&&j.push(O),Array.prototype.splice.apply(r,j)}}}}}return r},hooks:{all:{},add:function(e,t){var a=n.hooks.all;a[e]=a[e]||[],a[e].push(t)},run:function(e,t){var a=n.hooks.all[e];if(a&&a.length)for(var r,i=0;r=a[i++];)r(t)}}},a=n.Token=function(e,t,n,a,r){this.type=e,this.content=t,this.alias=n,this.matchedStr=a||null,this.greedy=!!r};if(a.stringify=function(e,t,r){if("string"==typeof e)return e;if("Array"===n.util.type(e))return e.map(function(n){return a.stringify(n,t,e)}).join("");var i={type:e.type,content:a.stringify(e.content,t,r),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:r};if("comment"==i.type&&(i.attributes.spellcheck="true"),e.alias){var l="Array"===n.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(i.classes,l)}n.hooks.run("wrap",i);var o="";for(var s in i.attributes)o+=(o?" ":"")+s+'="'+(i.attributes[s]||"")+'"';return"<"+i.tag+' class="'+i.classes.join(" ")+'"'+(o?" "+o:"")+">"+i.content+""},!_self.document)return _self.addEventListener?(_self.addEventListener("message",function(e){var t=JSON.parse(e.data),a=t.language,r=t.code,i=t.immediateClose;_self.postMessage(n.highlight(r,n.languages[a],a)),i&&_self.close()},!1),_self.Prism):_self.Prism;var r=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return r&&(n.filename=r.src,document.addEventListener&&!r.hasAttribute("data-manual")&&("loading"!==document.readyState?window.requestAnimationFrame?window.requestAnimationFrame(n.highlightAll):window.setTimeout(n.highlightAll,16):document.addEventListener("DOMContentLoaded",n.highlightAll))),_self.Prism}();"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); 3 | Prism.languages.markup={comment://,prolog:/<\?[\w\W]+?\?>/,doctype://,cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\\1|\\?(?!\1)[\w\W])*\1|[^\s'">=]+))?)*\s*\/?>/i,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=(?:('|")[\w\W]*?(\1)|[^\s>]+)/i,inside:{punctuation:/[=>"']/}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},Prism.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))}),Prism.languages.xml=Prism.languages.markup,Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup; 4 | Prism.languages.css={comment:/\/\*[\w\W]*?\*\//,atrule:{pattern:/@[\w-]+?.*?(;|(?=\s*\{))/i,inside:{rule:/@[\w-]+/}},url:/url\((?:(["'])(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,selector:/[^\{\}\s][^\{\};]*?(?=\s*\{)/,string:{pattern:/("|')(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1/,greedy:!0},property:/(\b|\B)[\w-]+(?=\s*:)/i,important:/\B!important\b/i,"function":/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:]/},Prism.languages.css.atrule.inside.rest=Prism.util.clone(Prism.languages.css),Prism.languages.markup&&(Prism.languages.insertBefore("markup","tag",{style:{pattern:/()[\w\W]*?(?=<\/style>)/i,lookbehind:!0,inside:Prism.languages.css,alias:"language-css"}}),Prism.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|').*?\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:Prism.languages.markup.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:Prism.languages.css}},alias:"language-css"}},Prism.languages.markup.tag)); 5 | Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\w\W]*?\*\//,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0}],string:{pattern:/(["'])(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[a-z0-9_\.\\]+/i,lookbehind:!0,inside:{punctuation:/(\.|\\)/}},keyword:/\b(if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,"boolean":/\b(true|false)\b/,"function":/[a-z0-9_]+(?=\()/i,number:/\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)\b/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/}; 6 | Prism.languages.javascript=Prism.languages.extend("clike",{keyword:/\b(as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/,number:/\b-?(0x[\dA-Fa-f]+|0b[01]+|0o[0-7]+|\d*\.?\d+([Ee][+-]?\d+)?|NaN|Infinity)\b/,"function":/[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*(?=\()/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*\*?|\/|~|\^|%|\.{3}/}),Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/(^|[^\/])\/(?!\/)(\[.+?]|\\.|[^\/\\\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})]))/,lookbehind:!0,greedy:!0}}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\\\|\\?[^\\])*?`/,greedy:!0,inside:{interpolation:{pattern:/\$\{[^}]+\}/,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{script:{pattern:/()[\w\W]*?(?=<\/script>)/i,lookbehind:!0,inside:Prism.languages.javascript,alias:"language-javascript"}}),Prism.languages.js=Prism.languages.javascript; 7 | !function(e){var t={variable:[{pattern:/\$?\(\([\w\W]+?\)\)/,inside:{variable:[{pattern:/(^\$\(\([\w\W]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b-?(?:0x[\dA-Fa-f]+|\d*\.?\d+(?:[Ee]-?\d+)?)\b/,operator:/--?|-=|\+\+?|\+=|!=?|~|\*\*?|\*=|\/=?|%=?|<<=?|>>=?|<=?|>=?|==?|&&?|&=|\^=?|\|\|?|\|=|\?|:/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\([^)]+\)|`[^`]+`/,inside:{variable:/^\$\(|^`|\)$|`$/}},/\$(?:[a-z0-9_#\?\*!@]+|\{[^}]+\})/i]};e.languages.bash={shebang:{pattern:/^#!\s*\/bin\/bash|^#!\s*\/bin\/sh/,alias:"important"},comment:{pattern:/(^|[^"{\\])#.*/,lookbehind:!0},string:[{pattern:/((?:^|[^<])<<\s*)(?:"|')?(\w+?)(?:"|')?\s*\r?\n(?:[\s\S])*?\r?\n\2/g,lookbehind:!0,greedy:!0,inside:t},{pattern:/(["'])(?:\\\\|\\?[^\\])*?\1/g,greedy:!0,inside:t}],variable:t.variable,"function":{pattern:/(^|\s|;|\||&)(?:alias|apropos|apt-get|aptitude|aspell|awk|basename|bash|bc|bg|builtin|bzip2|cal|cat|cd|cfdisk|chgrp|chmod|chown|chroot|chkconfig|cksum|clear|cmp|comm|command|cp|cron|crontab|csplit|cut|date|dc|dd|ddrescue|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|enable|env|ethtool|eval|exec|expand|expect|export|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|getopts|git|grep|groupadd|groupdel|groupmod|groups|gzip|hash|head|help|hg|history|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|jobs|join|kill|killall|less|link|ln|locate|logname|logout|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|make|man|mkdir|mkfifo|mkisofs|mknod|more|most|mount|mtools|mtr|mv|mmv|nano|netstat|nice|nl|nohup|notify-send|npm|nslookup|open|op|passwd|paste|pathchk|ping|pkill|popd|pr|printcap|printenv|printf|ps|pushd|pv|pwd|quota|quotacheck|quotactl|ram|rar|rcp|read|readarray|readonly|reboot|rename|renice|remsync|rev|rm|rmdir|rsync|screen|scp|sdiff|sed|seq|service|sftp|shift|shopt|shutdown|sleep|slocate|sort|source|split|ssh|stat|strace|su|sudo|sum|suspend|sync|tail|tar|tee|test|time|timeout|times|touch|top|traceroute|trap|tr|tsort|tty|type|ulimit|umask|umount|unalias|uname|unexpand|uniq|units|unrar|unshar|uptime|useradd|userdel|usermod|users|uuencode|uudecode|v|vdir|vi|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yes|zip)(?=$|\s|;|\||&)/,lookbehind:!0},keyword:{pattern:/(^|\s|;|\||&)(?:let|:|\.|if|then|else|elif|fi|for|break|continue|while|in|case|function|select|do|done|until|echo|exit|return|set|declare)(?=$|\s|;|\||&)/,lookbehind:!0},"boolean":{pattern:/(^|\s|;|\||&)(?:true|false)(?=$|\s|;|\||&)/,lookbehind:!0},operator:/&&?|\|\|?|==?|!=?|<<>|<=?|>=?|=~/,punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];]/};var a=t.variable[1].inside;a["function"]=e.languages.bash["function"],a.keyword=e.languages.bash.keyword,a.boolean=e.languages.bash.boolean,a.operator=e.languages.bash.operator,a.punctuation=e.languages.bash.punctuation}(Prism); 8 | Prism.languages.c=Prism.languages.extend("clike",{keyword:/\b(asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/,operator:/\-[>-]?|\+\+?|!=?|<>?=?|==?|&&?|\|?\||[~^%?*\/]/,number:/\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)[ful]*\b/i}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^\s*)#\s*[a-z]+([^\r\n\\]|\\.|\\(?:\r\n?|\n))*/im,lookbehind:!0,alias:"property",inside:{string:{pattern:/(#\s*include\s*)(<.+?>|("|')(\\?.)+?\3)/,lookbehind:!0},directive:{pattern:/(#\s*)\b(define|elif|else|endif|error|ifdef|ifndef|if|import|include|line|pragma|undef|using)\b/,lookbehind:!0,alias:"keyword"}}},constant:/\b(__FILE__|__LINE__|__DATE__|__TIME__|__TIMESTAMP__|__func__|EOF|NULL|stdin|stdout|stderr)\b/}),delete Prism.languages.c["class-name"],delete Prism.languages.c["boolean"]; 9 | Prism.languages.csharp=Prism.languages.extend("clike",{keyword:/\b(abstract|as|async|await|base|bool|break|byte|case|catch|char|checked|class|const|continue|decimal|default|delegate|do|double|else|enum|event|explicit|extern|false|finally|fixed|float|for|foreach|goto|if|implicit|in|int|interface|internal|is|lock|long|namespace|new|null|object|operator|out|override|params|private|protected|public|readonly|ref|return|sbyte|sealed|short|sizeof|stackalloc|static|string|struct|switch|this|throw|true|try|typeof|uint|ulong|unchecked|unsafe|ushort|using|virtual|void|volatile|while|add|alias|ascending|async|await|descending|dynamic|from|get|global|group|into|join|let|orderby|partial|remove|select|set|value|var|where|yield)\b/,string:[/@("|')(\1\1|\\\1|\\?(?!\1)[\s\S])*\1/,/("|')(\\?.)*?\1/],number:/\b-?(0x[\da-f]+|\d*\.?\d+f?)\b/i}),Prism.languages.insertBefore("csharp","keyword",{"generic-method":{pattern:/[a-z0-9_]+\s*<[^>\r\n]+?>\s*(?=\()/i,alias:"function",inside:{keyword:Prism.languages.csharp.keyword,punctuation:/[<>(),.:]/}},preprocessor:{pattern:/(^\s*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(\s*#)\b(define|elif|else|endif|endregion|error|if|line|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}}); 10 | Prism.languages.cpp=Prism.languages.extend("c",{keyword:/\b(alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|class|compl|const|constexpr|const_cast|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|long|mutable|namespace|new|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,"boolean":/\b(true|false)\b/,operator:/[-+]{1,2}|!=?|<{1,2}=?|>{1,2}=?|\->|:{1,2}|={1,2}|\^|~|%|&{1,2}|\|?\||\?|\*|\/|\b(and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/}),Prism.languages.insertBefore("cpp","keyword",{"class-name":{pattern:/(class\s+)[a-z0-9_]+/i,lookbehind:!0}}); 11 | !function(e){e.languages.ruby=e.languages.extend("clike",{comment:/#(?!\{[^\r\n]*?\}).*/,keyword:/\b(alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|false|for|if|in|module|new|next|nil|not|or|raise|redo|require|rescue|retry|return|self|super|then|throw|true|undef|unless|until|when|while|yield)\b/});var n={pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"tag"},rest:e.util.clone(e.languages.ruby)}};e.languages.insertBefore("ruby","keyword",{regex:[{pattern:/%r([^a-zA-Z0-9\s\{\(\[<])(?:[^\\]|\\[\s\S])*?\1[gim]{0,3}/,inside:{interpolation:n}},{pattern:/%r\((?:[^()\\]|\\[\s\S])*\)[gim]{0,3}/,inside:{interpolation:n}},{pattern:/%r\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}[gim]{0,3}/,inside:{interpolation:n}},{pattern:/%r\[(?:[^\[\]\\]|\\[\s\S])*\][gim]{0,3}/,inside:{interpolation:n}},{pattern:/%r<(?:[^<>\\]|\\[\s\S])*>[gim]{0,3}/,inside:{interpolation:n}},{pattern:/(^|[^\/])\/(?!\/)(\[.+?]|\\.|[^\/\r\n])+\/[gim]{0,3}(?=\s*($|[\r\n,.;})]))/,lookbehind:!0}],variable:/[@$]+[a-zA-Z_][a-zA-Z_0-9]*(?:[?!]|\b)/,symbol:/:[a-zA-Z_][a-zA-Z_0-9]*(?:[?!]|\b)/}),e.languages.insertBefore("ruby","number",{builtin:/\b(Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|File|Fixnum|Fload|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/,constant:/\b[A-Z][a-zA-Z_0-9]*(?:[?!]|\b)/}),e.languages.ruby.string=[{pattern:/%[qQiIwWxs]?([^a-zA-Z0-9\s\{\(\[<])(?:[^\\]|\\[\s\S])*?\1/,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?\((?:[^()\\]|\\[\s\S])*\)/,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}/,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?\[(?:[^\[\]\\]|\\[\s\S])*\]/,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?<(?:[^<>\\]|\\[\s\S])*>/,inside:{interpolation:n}},{pattern:/("|')(#\{[^}]+\}|\\(?:\r?\n|\r)|\\?.)*?\1/,inside:{interpolation:n}}]}(Prism); 12 | Prism.languages.css.selector={pattern:/[^\{\}\s][^\{\}]*(?=\s*\{)/,inside:{"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+(?:\(.*\))?/,"class":/\.[-:\.\w]+/,id:/#[-:\.\w]+/,attribute:/\[[^\]]+\]/}},Prism.languages.insertBefore("css","function",{hexcode:/#[\da-f]{3,6}/i,entity:/\\[\da-f]{1,8}/i,number:/[\d%\.]+/}); 13 | Prism.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d+.*$/m],deleted:/^[-<].*$/m,inserted:/^[+>].*$/m,diff:{pattern:/^!(?!!).+$/m,alias:"important"}}; 14 | Prism.languages.docker={keyword:{pattern:/(^\s*)(?:ONBUILD|FROM|MAINTAINER|RUN|EXPOSE|ENV|ADD|COPY|VOLUME|USER|WORKDIR|CMD|LABEL|ENTRYPOINT)(?=\s)/im,lookbehind:!0},string:/("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*?\1/,comment:/#.*/,punctuation:/---|\.\.\.|[:[\]{}\-,|>?]/}; 15 | Prism.languages.git={comment:/^#.*/m,deleted:/^[-–].*/m,inserted:/^\+.*/m,string:/("|')(\\?.)*?\1/m,command:{pattern:/^.*\$ git .*$/m,inside:{parameter:/\s(--|-)\w+/m}},coord:/^@@.*@@$/m,commit_sha1:/^commit \w{40}$/m}; 16 | Prism.languages.glsl=Prism.languages.extend("clike",{comment:[/\/\*[\w\W]*?\*\//,/\/\/(?:\\(?:\r\n|[\s\S])|.)*/],number:/\b(?:0x[\da-f]+|(?:\.\d+|\d+\.?\d*)(?:e[+-]?\d+)?)[ulf]*\b/i,keyword:/\b(?:attribute|const|uniform|varying|buffer|shared|coherent|volatile|restrict|readonly|writeonly|atomic_uint|layout|centroid|flat|smooth|noperspective|patch|sample|break|continue|do|for|while|switch|case|default|if|else|subroutine|in|out|inout|float|double|int|void|bool|true|false|invariant|precise|discard|return|d?mat[234](?:x[234])?|[ibdu]?vec[234]|uint|lowp|mediump|highp|precision|[iu]?sampler[123]D|[iu]?samplerCube|sampler[12]DShadow|samplerCubeShadow|[iu]?sampler[12]DArray|sampler[12]DArrayShadow|[iu]?sampler2DRect|sampler2DRectShadow|[iu]?samplerBuffer|[iu]?sampler2DMS(?:Array)?|[iu]?samplerCubeArray|samplerCubeArrayShadow|[iu]?image[123]D|[iu]?image2DRect|[iu]?imageCube|[iu]?imageBuffer|[iu]?image[12]DArray|[iu]?imageCubeArray|[iu]?image2DMS(?:Array)?|struct|common|partition|active|asm|class|union|enum|typedef|template|this|resource|goto|inline|noinline|public|static|extern|external|interface|long|short|half|fixed|unsigned|superp|input|output|hvec[234]|fvec[234]|sampler3DRect|filter|sizeof|cast|namespace|using)\b/}),Prism.languages.insertBefore("glsl","comment",{preprocessor:{pattern:/(^[ \t]*)#(?:(?:define|undef|if|ifdef|ifndef|else|elif|endif|error|pragma|extension|version|line)\b)?/m,lookbehind:!0,alias:"builtin"}}); 17 | Prism.languages.go=Prism.languages.extend("clike",{keyword:/\b(break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,builtin:/\b(bool|byte|complex(64|128)|error|float(32|64)|rune|string|u?int(8|16|32|64|)|uintptr|append|cap|close|complex|copy|delete|imag|len|make|new|panic|print(ln)?|real|recover)\b/,"boolean":/\b(_|iota|nil|true|false)\b/,operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,number:/\b(-?(0x[a-f\d]+|(\d+\.?\d*|\.\d+)(e[-+]?\d+)?)i?)\b/i,string:/("|'|`)(\\?.|\r|\n)*?\1/}),delete Prism.languages.go["class-name"]; 18 | Prism.languages.haskell={comment:{pattern:/(^|[^-!#$%*+=?&@|~.:<>^\\\/])(--[^-!#$%*+=?&@|~.:<>^\\\/].*|{-[\w\W]*?-})/m,lookbehind:!0},"char":/'([^\\']|\\([abfnrtv\\"'&]|\^[A-Z@[\]\^_]|NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|\d+|o[0-7]+|x[0-9a-fA-F]+))'/,string:{pattern:/"([^\\"]|\\([abfnrtv\\"'&]|\^[A-Z@[\]\^_]|NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|\d+|o[0-7]+|x[0-9a-fA-F]+)|\\\s+\\)*"/,greedy:!0},keyword:/\b(case|class|data|deriving|do|else|if|in|infixl|infixr|instance|let|module|newtype|of|primitive|then|type|where)\b/,import_statement:{pattern:/(\r?\n|\r|^)\s*import\s+(qualified\s+)?([A-Z][_a-zA-Z0-9']*)(\.[A-Z][_a-zA-Z0-9']*)*(\s+as\s+([A-Z][_a-zA-Z0-9']*)(\.[A-Z][_a-zA-Z0-9']*)*)?(\s+hiding\b)?/m,inside:{keyword:/\b(import|qualified|as|hiding)\b/}},builtin:/\b(abs|acos|acosh|all|and|any|appendFile|approxRational|asTypeOf|asin|asinh|atan|atan2|atanh|basicIORun|break|catch|ceiling|chr|compare|concat|concatMap|const|cos|cosh|curry|cycle|decodeFloat|denominator|digitToInt|div|divMod|drop|dropWhile|either|elem|encodeFloat|enumFrom|enumFromThen|enumFromThenTo|enumFromTo|error|even|exp|exponent|fail|filter|flip|floatDigits|floatRadix|floatRange|floor|fmap|foldl|foldl1|foldr|foldr1|fromDouble|fromEnum|fromInt|fromInteger|fromIntegral|fromRational|fst|gcd|getChar|getContents|getLine|group|head|id|inRange|index|init|intToDigit|interact|ioError|isAlpha|isAlphaNum|isAscii|isControl|isDenormalized|isDigit|isHexDigit|isIEEE|isInfinite|isLower|isNaN|isNegativeZero|isOctDigit|isPrint|isSpace|isUpper|iterate|last|lcm|length|lex|lexDigits|lexLitChar|lines|log|logBase|lookup|map|mapM|mapM_|max|maxBound|maximum|maybe|min|minBound|minimum|mod|negate|not|notElem|null|numerator|odd|or|ord|otherwise|pack|pi|pred|primExitWith|print|product|properFraction|putChar|putStr|putStrLn|quot|quotRem|range|rangeSize|read|readDec|readFile|readFloat|readHex|readIO|readInt|readList|readLitChar|readLn|readOct|readParen|readSigned|reads|readsPrec|realToFrac|recip|rem|repeat|replicate|return|reverse|round|scaleFloat|scanl|scanl1|scanr|scanr1|seq|sequence|sequence_|show|showChar|showInt|showList|showLitChar|showParen|showSigned|showString|shows|showsPrec|significand|signum|sin|sinh|snd|sort|span|splitAt|sqrt|subtract|succ|sum|tail|take|takeWhile|tan|tanh|threadToIOResult|toEnum|toInt|toInteger|toLower|toRational|toUpper|truncate|uncurry|undefined|unlines|until|unwords|unzip|unzip3|userError|words|writeFile|zip|zip3|zipWith|zipWith3)\b/,number:/\b(\d+(\.\d+)?(e[+-]?\d+)?|0o[0-7]+|0x[0-9a-f]+)\b/i,operator:/\s\.\s|[-!#$%*+=?&@|~.:<>^\\\/]*\.[-!#$%*+=?&@|~.:<>^\\\/]+|[-!#$%*+=?&@|~.:<>^\\\/]+\.[-!#$%*+=?&@|~.:<>^\\\/]*|[-!#$%*+=?&@|~:<>^\\\/]+|`([A-Z][_a-zA-Z0-9']*\.)*[_a-z][_a-zA-Z0-9']*`/,hvariable:/\b([A-Z][_a-zA-Z0-9']*\.)*[_a-z][_a-zA-Z0-9']*\b/,constant:/\b([A-Z][_a-zA-Z0-9']*\.)*[A-Z][_a-zA-Z0-9']*\b/,punctuation:/[{}[\];(),.:]/}; 19 | Prism.languages.http={"request-line":{pattern:/^(POST|GET|PUT|DELETE|OPTIONS|PATCH|TRACE|CONNECT)\b\shttps?:\/\/\S+\sHTTP\/[0-9.]+/m,inside:{property:/^(POST|GET|PUT|DELETE|OPTIONS|PATCH|TRACE|CONNECT)\b/,"attr-name":/:\w+/}},"response-status":{pattern:/^HTTP\/1.[01] [0-9]+.*/m,inside:{property:{pattern:/(^HTTP\/1.[01] )[0-9]+.*/i,lookbehind:!0}}},"header-name":{pattern:/^[\w-]+:(?=.)/m,alias:"keyword"}};var httpLanguages={"application/json":Prism.languages.javascript,"application/xml":Prism.languages.markup,"text/xml":Prism.languages.markup,"text/html":Prism.languages.markup};for(var contentType in httpLanguages)if(httpLanguages[contentType]){var options={};options[contentType]={pattern:new RegExp("(content-type:\\s*"+contentType+"[\\w\\W]*?)(?:\\r?\\n|\\r){2}[\\w\\W]*","i"),lookbehind:!0,inside:{rest:httpLanguages[contentType]}},Prism.languages.insertBefore("http","header-name",options)}; 20 | Prism.languages.icon={comment:/#.*/,string:/(["'])(?:(?!\1)[^\\\r\n]|\\.|_(?:\r?\n|\r))*\1/,number:/\b(?:\d+r[a-z\d]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b|\.\d+\b/i,"builtin-keyword":{pattern:/&(?:allocated|ascii|clock|collections|cset|current|date|dateline|digits|dump|e|error(?:number|text|value)?|errout|fail|features|file|host|input|lcase|letters|level|line|main|null|output|phi|pi|pos|progname|random|regions|source|storage|subject|time|trace|ucase|version)\b/,alias:"variable"},directive:{pattern:/\$\w+/,alias:"builtin"},keyword:/\b(?:break|by|case|create|default|do|else|end|every|fail|global|if|initial|invocable|link|local|next|not|of|procedure|record|repeat|return|static|suspend|then|to|until|while)\b/,"function":/(?!\d)\w+(?=\s*[({]|\s*!\s*\[)/,operator:/[+-]:(?!=)|(?:[\/?@^%&]|\+\+?|--?|==?=?|~==?=?|\*\*?|\|\|\|?|<(?:->?|>?=?)(?::=)?|:(?:=:?)?|[!.\\|~]/,punctuation:/[\[\](){},;]/}; 21 | Prism.languages.ini={comment:/^[ \t]*;.*$/m,important:/\[.*?\]/,constant:/^[ \t]*[^\s=]+?(?=[ \t]*=)/m,"attr-value":{pattern:/=.*/,inside:{punctuation:/^[=]/}}}; 22 | Prism.languages.java=Prism.languages.extend("clike",{keyword:/\b(abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while)\b/,number:/\b0b[01]+\b|\b0x[\da-f]*\.?[\da-fp\-]+\b|\b\d*\.?\d+(?:e[+-]?\d+)?[df]?\b/i,operator:{pattern:/(^|[^.])(?:\+[+=]?|-[-=]?|!=?|<>?>?=?|==?|&[&=]?|\|[|=]?|\*=?|\/=?|%=?|\^=?|[?:~])/m,lookbehind:!0}}),Prism.languages.insertBefore("java","function",{annotation:{alias:"punctuation",pattern:/(^|[^.])@\w+/,lookbehind:!0}}); 23 | Prism.languages.json={property:/".*?"(?=\s*:)/gi,string:/"(?!:)(\\?[^"])*?"(?!:)/g,number:/\b-?(0x[\dA-Fa-f]+|\d*\.?\d+([Ee]-?\d+)?)\b/g,punctuation:/[{}[\]);,]/g,operator:/:/g,"boolean":/\b(true|false)\b/gi,"null":/\bnull\b/gi},Prism.languages.jsonp=Prism.languages.json; 24 | !function(a){var e=/\\([^a-z()[\]]|[a-z\*]+)/i,n={"equation-command":{pattern:e,alias:"regex"}};a.languages.latex={comment:/%.*/m,cdata:{pattern:/(\\begin\{((?:verbatim|lstlisting)\*?)\})([\w\W]*?)(?=\\end\{\2\})/,lookbehind:!0},equation:[{pattern:/\$(?:\\?[\w\W])*?\$|\\\((?:\\?[\w\W])*?\\\)|\\\[(?:\\?[\w\W])*?\\\]/,inside:n,alias:"string"},{pattern:/(\\begin\{((?:equation|math|eqnarray|align|multline|gather)\*?)\})([\w\W]*?)(?=\\end\{\2\})/,lookbehind:!0,inside:n,alias:"string"}],keyword:{pattern:/(\\(?:begin|end|ref|cite|label|usepackage|documentclass)(?:\[[^\]]+\])?\{)[^}]+(?=\})/,lookbehind:!0},url:{pattern:/(\\url\{)[^}]+(?=\})/,lookbehind:!0},headline:{pattern:/(\\(?:part|chapter|section|subsection|frametitle|subsubsection|paragraph|subparagraph|subsubparagraph|subsubsubparagraph)\*?(?:\[[^\]]+\])?\{)[^}]+(?=\}(?:\[[^\]]+\])?)/,lookbehind:!0,alias:"class-name"},"function":{pattern:e,alias:"selector"},punctuation:/[[\]{}&]/}}(Prism); 25 | Prism.languages.less=Prism.languages.extend("css",{comment:[/\/\*[\w\W]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-]+?(?:\([^{}]+\)|[^(){};])*?(?=\s*\{)/i,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\([^{}]*\)|[^{};@])*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/i,punctuation:/[{}();:,]/,operator:/[+\-*\/]/}),Prism.languages.insertBefore("less","punctuation",{"function":Prism.languages.less.function}),Prism.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-]+.*?(?=[(;])/,lookbehind:!0,alias:"function"}}); 26 | Prism.languages.lua={comment:/^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[\s\S]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,greedy:!0},number:/\b0x[a-f\d]+\.?[a-f\d]*(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|\.?\d*(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,keyword:/\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,"function":/(?!\d)\w+(?=\s*(?:[({]))/,operator:[/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/}; 27 | Prism.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|.)*/,lookbehind:!0},string:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,builtin:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,symbol:{pattern:/^[^:=\r\n]+(?=\s*:(?!=))/m,inside:{variable:/\$+(?:[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:[/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,{pattern:/(\()(?:addsuffix|abspath|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:s|list)?)(?=[ \t])/,lookbehind:!0}],operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/}; 28 | Prism.languages.markdown=Prism.languages.extend("markup",{}),Prism.languages.insertBefore("markdown","prolog",{blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},code:[{pattern:/^(?: {4}|\t).+/m,alias:"keyword"},{pattern:/``.+?``|`[^`\n]+`/,alias:"keyword"}],title:[{pattern:/\w+.*(?:\r?\n|\r)(?:==+|--+)/,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#+.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])([\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:/(^|[^\\])(\*\*|__)(?:(?:\r?\n|\r)(?!\r?\n|\r)|.)+?\2/,lookbehind:!0,inside:{punctuation:/^\*\*|^__|\*\*$|__$/}},italic:{pattern:/(^|[^\\])([*_])(?:(?:\r?\n|\r)(?!\r?\n|\r)|.)+?\2/,lookbehind:!0,inside:{punctuation:/^[*_]|[*_]$/}},url:{pattern:/!?\[[^\]]+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)| ?\[[^\]\n]*\])/,inside:{variable:{pattern:/(!?\[)[^\]]+(?=\]$)/,lookbehind:!0},string:{pattern:/"(?:\\.|[^"\\])*"(?=\)$)/}}}}),Prism.languages.markdown.bold.inside.url=Prism.util.clone(Prism.languages.markdown.url),Prism.languages.markdown.italic.inside.url=Prism.util.clone(Prism.languages.markdown.url),Prism.languages.markdown.bold.inside.italic=Prism.util.clone(Prism.languages.markdown.italic),Prism.languages.markdown.italic.inside.bold=Prism.util.clone(Prism.languages.markdown.bold); 29 | Prism.languages.matlab={string:/\B'(?:''|[^'\n])*'/,comment:[/%\{[\s\S]*?\}%/,/%.+/],number:/\b-?(?:\d*\.?\d+(?:[eE][+-]?\d+)?(?:[ij])?|[ij])\b/,keyword:/\b(?:break|case|catch|continue|else|elseif|end|for|function|if|inf|NaN|otherwise|parfor|pause|pi|return|switch|try|while)\b/,"function":/(?!\d)\w+(?=\s*\()/,operator:/\.?[*^\/\\']|[+\-:@]|[<>=~]=?|&&?|\|\|?/,punctuation:/\.{3}|[.,;\[\](){}!]/}; 30 | Prism.languages.objectivec=Prism.languages.extend("c",{keyword:/\b(asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while|in|self|super)\b|(@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,string:/("|')(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|@"(\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,operator:/-[->]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}); 31 | Prism.languages.perl={comment:[{pattern:/(^\s*)=\w+[\s\S]*?=cut.*/m,lookbehind:!0},{pattern:/(^|[^\\$])#.*/,lookbehind:!0}],string:[/\b(?:q|qq|qx|qw)\s*([^a-zA-Z0-9\s\{\(\[<])(?:[^\\]|\\[\s\S])*?\1/,/\b(?:q|qq|qx|qw)\s+([a-zA-Z0-9])(?:[^\\]|\\[\s\S])*?\1/,/\b(?:q|qq|qx|qw)\s*\((?:[^()\\]|\\[\s\S])*\)/,/\b(?:q|qq|qx|qw)\s*\{(?:[^{}\\]|\\[\s\S])*\}/,/\b(?:q|qq|qx|qw)\s*\[(?:[^[\]\\]|\\[\s\S])*\]/,/\b(?:q|qq|qx|qw)\s*<(?:[^<>\\]|\\[\s\S])*>/,/("|`)(?:[^\\]|\\[\s\S])*?\1/,/'(?:[^'\\\r\n]|\\.)*'/],regex:[/\b(?:m|qr)\s*([^a-zA-Z0-9\s\{\(\[<])(?:[^\\]|\\[\s\S])*?\1[msixpodualngc]*/,/\b(?:m|qr)\s+([a-zA-Z0-9])(?:[^\\]|\\.)*?\1[msixpodualngc]*/,/\b(?:m|qr)\s*\((?:[^()\\]|\\[\s\S])*\)[msixpodualngc]*/,/\b(?:m|qr)\s*\{(?:[^{}\\]|\\[\s\S])*\}[msixpodualngc]*/,/\b(?:m|qr)\s*\[(?:[^[\]\\]|\\[\s\S])*\][msixpodualngc]*/,/\b(?:m|qr)\s*<(?:[^<>\\]|\\[\s\S])*>[msixpodualngc]*/,{pattern:/(^|[^-]\b)(?:s|tr|y)\s*([^a-zA-Z0-9\s\{\(\[<])(?:[^\\]|\\[\s\S])*?\2(?:[^\\]|\\[\s\S])*?\2[msixpodualngcer]*/,lookbehind:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s+([a-zA-Z0-9])(?:[^\\]|\\[\s\S])*?\2(?:[^\\]|\\[\s\S])*?\2[msixpodualngcer]*/,lookbehind:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s*\((?:[^()\\]|\\[\s\S])*\)\s*\((?:[^()\\]|\\[\s\S])*\)[msixpodualngcer]*/,lookbehind:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s*\{(?:[^{}\\]|\\[\s\S])*\}\s*\{(?:[^{}\\]|\\[\s\S])*\}[msixpodualngcer]*/,lookbehind:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s*\[(?:[^[\]\\]|\\[\s\S])*\]\s*\[(?:[^[\]\\]|\\[\s\S])*\][msixpodualngcer]*/,lookbehind:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s*<(?:[^<>\\]|\\[\s\S])*>\s*<(?:[^<>\\]|\\[\s\S])*>[msixpodualngcer]*/,lookbehind:!0},/\/(?:[^\/\\\r\n]|\\.)*\/[msixpodualngc]*(?=\s*(?:$|[\r\n,.;})&|\-+*~<>!?^]|(lt|gt|le|ge|eq|ne|cmp|not|and|or|xor|x)\b))/],variable:[/[&*$@%]\{\^[A-Z]+\}/,/[&*$@%]\^[A-Z_]/,/[&*$@%]#?(?=\{)/,/[&*$@%]#?((::)*'?(?!\d)[\w$]+)+(::)*/i,/[&*$@%]\d+/,/(?!%=)[$@%][!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~]/],filehandle:{pattern:/<(?![<=])\S*>|\b_\b/,alias:"symbol"},vstring:{pattern:/v\d+(\.\d+)*|\d+(\.\d+){2,}/,alias:"string"},"function":{pattern:/sub [a-z0-9_]+/i,inside:{keyword:/sub/}},keyword:/\b(any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|say|state|sub|switch|undef|unless|until|use|when|while)\b/,number:/\b-?(0x[\dA-Fa-f](_?[\dA-Fa-f])*|0b[01](_?[01])*|(\d(_?\d)*)?\.?\d(_?\d)*([Ee][+-]?\d+)?)\b/,operator:/-[rwxoRWXOezsfdlpSbctugkTBMAC]\b|\+[+=]?|-[-=>]?|\*\*?=?|\/\/?=?|=[=~>]?|~[~=]?|\|\|?=?|&&?=?|<(?:=>?|<=?)?|>>?=?|![~=]?|[%^]=?|\.(?:=|\.\.?)?|[\\?]|\bx(?:=|\b)|\b(lt|gt|le|ge|eq|ne|cmp|not|and|or|xor)\b/,punctuation:/[{}[\];(),:]/}; 32 | Prism.languages.php=Prism.languages.extend("clike",{keyword:/\b(and|or|xor|array|as|break|case|cfunction|class|const|continue|declare|default|die|do|else|elseif|enddeclare|endfor|endforeach|endif|endswitch|endwhile|extends|for|foreach|function|include|include_once|global|if|new|return|static|switch|use|require|require_once|var|while|abstract|interface|public|implements|private|protected|parent|throw|null|echo|print|trait|namespace|final|yield|goto|instanceof|finally|try|catch)\b/i,constant:/\b[A-Z0-9_]{2,}\b/,comment:{pattern:/(^|[^\\])(?:\/\*[\w\W]*?\*\/|\/\/.*)/,lookbehind:!0,greedy:!0}}),Prism.languages.insertBefore("php","class-name",{"shell-comment":{pattern:/(^|[^\\])#.*/,lookbehind:!0,alias:"comment"}}),Prism.languages.insertBefore("php","keyword",{delimiter:/\?>|<\?(?:php)?/i,variable:/\$\w+\b/i,"package":{pattern:/(\\|namespace\s+|use\s+)[\w\\]+/,lookbehind:!0,inside:{punctuation:/\\/}}}),Prism.languages.insertBefore("php","operator",{property:{pattern:/(->)[\w]+/,lookbehind:!0}}),Prism.languages.markup&&(Prism.hooks.add("before-highlight",function(e){"php"===e.language&&(e.tokenStack=[],e.code=e.code.replace(/(?:<\?php|<\?)[\w\W]*?(?:\?>)/gi,function(n){return e.tokenStack.push(n),"{{{PHP"+e.tokenStack.length+"}}}"}))}),Prism.hooks.add("after-highlight",function(e){if("php"===e.language){for(var n,a=0;n=e.tokenStack[a];a++)e.highlightedCode=e.highlightedCode.replace("{{{PHP"+(a+1)+"}}}",Prism.highlight(n,e.grammar,"php").replace(/\$/g,"$$$$"));e.element.innerHTML=e.highlightedCode}}),Prism.hooks.add("wrap",function(e){"php"===e.language&&"markup"===e.type&&(e.content=e.content.replace(/(\{\{\{PHP[0-9]+\}\}\})/g,'$1'))}),Prism.languages.insertBefore("php","comment",{markup:{pattern:/<[^?]\/?(.*?)>/,inside:Prism.languages.markup},php:/\{\{\{PHP[0-9]+\}\}\}/})); 33 | Prism.languages.insertBefore("php","variable",{"this":/\$this\b/,global:/\$(?:_(?:SERVER|GET|POST|FILES|REQUEST|SESSION|ENV|COOKIE)|GLOBALS|HTTP_RAW_POST_DATA|argc|argv|php_errormsg|http_response_header)/,scope:{pattern:/\b[\w\\]+::/,inside:{keyword:/(static|self|parent)/,punctuation:/(::|\\)/}}}); 34 | Prism.languages.powershell={comment:[{pattern:/(^|[^`])<#[\w\W]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(`?[\w\W])*?"/,greedy:!0,inside:{"function":{pattern:/[^`]\$\(.*?\)/,inside:{}}}},{pattern:/'([^']|'')*'/,greedy:!0}],namespace:/\[[a-z][\w\W]*?\]/i,"boolean":/\$(true|false)\b/i,variable:/\$\w+\b/i,"function":[/\b(Add-(Computer|Content|History|Member|PSSnapin|Type)|Checkpoint-Computer|Clear-(Content|EventLog|History|Item|ItemProperty|Variable)|Compare-Object|Complete-Transaction|Connect-PSSession|ConvertFrom-(Csv|Json|StringData)|Convert-Path|ConvertTo-(Csv|Html|Json|Xml)|Copy-(Item|ItemProperty)|Debug-Process|Disable-(ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)|Disconnect-PSSession|Enable-(ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)|Enter-PSSession|Exit-PSSession|Export-(Alias|Clixml|Console|Csv|FormatData|ModuleMember|PSSession)|ForEach-Object|Format-(Custom|List|Table|Wide)|Get-(Alias|ChildItem|Command|ComputerRestorePoint|Content|ControlPanelItem|Culture|Date|Event|EventLog|EventSubscriber|FormatData|Help|History|Host|HotFix|Item|ItemProperty|Job|Location|Member|Module|Process|PSBreakpoint|PSCallStack|PSDrive|PSProvider|PSSession|PSSessionConfiguration|PSSnapin|Random|Service|TraceSource|Transaction|TypeData|UICulture|Unique|Variable|WmiObject)|Group-Object|Import-(Alias|Clixml|Csv|LocalizedData|Module|PSSession)|Invoke-(Command|Expression|History|Item|RestMethod|WebRequest|WmiMethod)|Join-Path|Limit-EventLog|Measure-(Command|Object)|Move-(Item|ItemProperty)|New-(Alias|Event|EventLog|Item|ItemProperty|Module|ModuleManifest|Object|PSDrive|PSSession|PSSessionConfigurationFile|PSSessionOption|PSTransportOption|Service|TimeSpan|Variable|WebServiceProxy)|Out-(Default|File|GridView|Host|Null|Printer|String)|Pop-Location|Push-Location|Read-Host|Receive-(Job|PSSession)|Register-(EngineEvent|ObjectEvent|PSSessionConfiguration|WmiEvent)|Remove-(Computer|Event|EventLog|Item|ItemProperty|Job|Module|PSBreakpoint|PSDrive|PSSession|PSSnapin|TypeData|Variable|WmiObject)|Rename-(Computer|Item|ItemProperty)|Reset-ComputerMachinePassword|Resolve-Path|Restart-(Computer|Service)|Restore-Computer|Resume-(Job|Service)|Save-Help|Select-(Object|String|Xml)|Send-MailMessage|Set-(Alias|Content|Date|Item|ItemProperty|Location|PSBreakpoint|PSDebug|PSSessionConfiguration|Service|StrictMode|TraceSource|Variable|WmiInstance)|Show-(Command|ControlPanelItem|EventLog)|Sort-Object|Split-Path|Start-(Job|Process|Service|Sleep|Transaction)|Stop-(Computer|Job|Process|Service)|Suspend-(Job|Service)|Tee-Object|Test-(ComputerSecureChannel|Connection|ModuleManifest|Path|PSSessionConfigurationFile)|Trace-Command|Unblock-File|Undo-Transaction|Unregister-(Event|PSSessionConfiguration)|Update-(FormatData|Help|List|TypeData)|Use-Transaction|Wait-(Event|Job|Process)|Where-Object|Write-(Debug|Error|EventLog|Host|Output|Progress|Verbose|Warning))\b/i,/\b(ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(\W?)(!|-(eq|ne|gt|ge|lt|le|sh[lr]|not|b?(and|x?or)|(Not)?(Like|Match|Contains|In)|Replace|Join|is(Not)?|as)\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/},Prism.languages.powershell.string[0].inside.boolean=Prism.languages.powershell.boolean,Prism.languages.powershell.string[0].inside.variable=Prism.languages.powershell.variable,Prism.languages.powershell.string[0].inside.function.inside=Prism.util.clone(Prism.languages.powershell); 35 | Prism.languages.python={"triple-quoted-string":{pattern:/"""[\s\S]+?"""|'''[\s\S]+?'''/,alias:"string"},comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},string:{pattern:/("|')(?:\\\\|\\?[^\\\r\n])*?\1/,greedy:!0},"function":{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_][a-zA-Z0-9_]*(?=\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)[a-z0-9_]+/i,lookbehind:!0},keyword:/\b(?:as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|pass|print|raise|return|try|while|with|yield)\b/,"boolean":/\b(?:True|False)\b/,number:/\b-?(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:or|and|not)\b/,punctuation:/[{}[\];(),.:]/}; 36 | Prism.languages.r={comment:/#.*/,string:/(['"])(?:\\?.)*?\1/,"percent-operator":{pattern:/%[^%\s]*%/,alias:"operator"},"boolean":/\b(?:TRUE|FALSE)\b/,ellipsis:/\.\.(?:\.|\d+)/,number:[/\b(?:NaN|Inf)\b/,/\b(?:0x[\dA-Fa-f]+(?:\.\d*)?|\d*\.?\d+)(?:[EePp][+-]?\d+)?[iL]?\b/],keyword:/\b(?:if|else|repeat|while|function|for|in|next|break|NULL|NA|NA_integer_|NA_real_|NA_complex_|NA_character_)\b/,operator:/->?>?|<(?:=|=!]=?|::?|&&?|\|\|?|[+*\/^$@~]/,punctuation:/[(){}\[\],;]/}; 37 | Prism.languages.rust={comment:[{pattern:/(^|[^\\])\/\*[\w\W]*?\*\//,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0}],string:[/b?r(#*)"(?:\\?.)*?"\1/,/b?("|')(?:\\?.)*?\1/],keyword:/\b(?:abstract|alignof|as|be|box|break|const|continue|crate|do|else|enum|extern|false|final|fn|for|if|impl|in|let|loop|match|mod|move|mut|offsetof|once|override|priv|pub|pure|ref|return|sizeof|static|self|struct|super|true|trait|type|typeof|unsafe|unsized|use|virtual|where|while|yield)\b/,attribute:{pattern:/#!?\[.+?\]/,alias:"attr-name"},"function":[/[a-z0-9_]+(?=\s*\()/i,/[a-z0-9_]+!(?=\s*\(|\[)/i],"macro-rules":{pattern:/[a-z0-9_]+!/i,alias:"function"},number:/\b-?(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(\d(_?\d)*)?\.?\d(_?\d)*([Ee][+-]?\d+)?)(?:_?(?:[iu](?:8|16|32|64)?|f32|f64))?\b/,"closure-params":{pattern:/\|[^|]*\|(?=\s*[{-])/,inside:{punctuation:/[\|:,]/,operator:/[&*]/}},punctuation:/[{}[\];(),:]|\.+|->/,operator:/[-+*\/%!^=]=?|@|&[&=]?|\|[|=]?|<>?=?/}; 38 | Prism.languages.sas={datalines:{pattern:/^\s*(?:(?:data)?lines|cards);[\s\S]+?(?:\r?\n|\r);/im,alias:"string",inside:{keyword:{pattern:/^(\s*)(?:(?:data)?lines|cards)/i,lookbehind:!0},punctuation:/;/}},comment:[{pattern:/(^\s*|;\s*)\*.*;/m,lookbehind:!0},/\/\*[\s\S]+?\*\//],datetime:{pattern:/'[^']+'(?:dt?|t)\b/i,alias:"number"},string:/(["'])(?:\1\1|(?!\1)[\s\S])*\1/,keyword:/\b(?:data|else|format|if|input|proc\s\w+|quit|run|then)\b/i,number:/(?:\B-|\b)(?:[\da-f]+x|\d+(?:\.\d+)?(?:e[+-]?\d+)?)/i,operator:/\*\*?|\|\|?|!!?|¦¦?|<[>=]?|>[<=]?|[-+\/=&]|[~¬^]=?|\b(?:eq|ne|gt|lt|ge|le|in|not)\b/i,punctuation:/[$%@.(){}\[\];,\\]/}; 39 | Prism.languages.scheme={comment:/;.*/,string:/"(?:[^"\\\r\n]|\\.)*?"|'[^('\s]*/,keyword:{pattern:/(\()(?:define(?:-syntax|-library|-values)?|(?:case-)?lambda|let(?:\*|rec)?(?:-values)?|else|if|cond|begin|delay(?:-force)?|parameterize|guard|set!|(?:quasi-)?quote|syntax-rules)/,lookbehind:!0},builtin:{pattern:/(\()(?:(?:cons|car|cdr|list|call-with-current-continuation|call\/cc|append|abs|apply|eval)\b|null\?|pair\?|boolean\?|eof-object\?|char\?|procedure\?|number\?|port\?|string\?|vector\?|symbol\?|bytevector\?)/,lookbehind:!0},number:{pattern:/(\s|\))[-+]?[0-9]*\.?[0-9]+(?:\s*[-+]\s*[0-9]*\.?[0-9]+i)?\b/,lookbehind:!0},"boolean":/#[tf]/,operator:{pattern:/(\()(?:[-+*%\/]|[<>]=?|=>?)/,lookbehind:!0},"function":{pattern:/(\()[^\s()]*(?=\s)/,lookbehind:!0},punctuation:/[()]/}; 40 | Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\w\W]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},string:{pattern:/(^|[^@\\])("|')(?:\\?[\s\S])*?\2/,lookbehind:!0},variable:/@[\w.$]+|@("|'|`)(?:\\?[\s\S])+?\1/,"function":/\b(?:COUNT|SUM|AVG|MIN|MAX|FIRST|LAST|UCASE|LCASE|MID|LEN|ROUND|NOW|FORMAT)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR VARYING|CHARACTER (?:SET|VARYING)|CHARSET|CHECK|CHECKPOINT|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMN|COLUMNS|COMMENT|COMMIT|COMMITTED|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS|CONTAINSTABLE|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|DATA(?:BASES?)?|DATE(?:TIME)?|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITER(?:S)?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE(?: PRECISION)?|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE KEY|ELSE|ENABLE|ENCLOSED BY|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPE(?:D BY)?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|IDENTITY(?:_INSERT|COL)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTO|INVOKER|ISOLATION LEVEL|JOIN|KEYS?|KILL|LANGUAGE SQL|LAST|LEFT|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MODIFIES SQL DATA|MODIFY|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL(?: CHAR VARYING| CHARACTER(?: VARYING)?| VARCHAR)?|NATURAL|NCHAR(?: VARCHAR)?|NEXT|NO(?: SQL|CHECK|CYCLE)?|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READ(?:S SQL DATA|TEXT)?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEATABLE|REPLICATION|REQUIRE|RESTORE|RESTRICT|RETURNS?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE MODE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|START(?:ING BY)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED BY|TEXT(?:SIZE)?|THEN|TIMESTAMP|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNPIVOT|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?)\b/i,"boolean":/\b(?:TRUE|FALSE|NULL)\b/i,number:/\b-?(?:0x)?\d*\.?[\da-f]+\b/,operator:/[-+*\/=%^~]|&&?|\|?\||!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|IN|LIKE|NOT|OR|IS|DIV|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}; 41 | Prism.languages.vim={string:/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\r\n]|'')*'/,comment:/".*/,"function":/\w+(?=\()/,keyword:/\b(?:ab|abbreviate|abc|abclear|abo|aboveleft|al|all|arga|argadd|argd|argdelete|argdo|arge|argedit|argg|argglobal|argl|arglocal|ar|args|argu|argument|as|ascii|bad|badd|ba|ball|bd|bdelete|be|bel|belowright|bf|bfirst|bl|blast|bm|bmodified|bn|bnext|bN|bNext|bo|botright|bp|bprevious|brea|break|breaka|breakadd|breakd|breakdel|breakl|breaklist|br|brewind|bro|browse|bufdo|b|buffer|buffers|bun|bunload|bw|bwipeout|ca|cabbrev|cabc|cabclear|caddb|caddbuffer|cad|caddexpr|caddf|caddfile|cal|call|cat|catch|cb|cbuffer|cc|ccl|cclose|cd|ce|center|cex|cexpr|cf|cfile|cfir|cfirst|cgetb|cgetbuffer|cgete|cgetexpr|cg|cgetfile|c|change|changes|chd|chdir|che|checkpath|checkt|checktime|cla|clast|cl|clist|clo|close|cmapc|cmapclear|cnew|cnewer|cn|cnext|cN|cNext|cnf|cnfile|cNfcNfile|cnorea|cnoreabbrev|col|colder|colo|colorscheme|comc|comclear|comp|compiler|conf|confirm|con|continue|cope|copen|co|copy|cpf|cpfile|cp|cprevious|cq|cquit|cr|crewind|cuna|cunabbrev|cu|cunmap|cw|cwindow|debugg|debuggreedy|delc|delcommand|d|delete|delf|delfunction|delm|delmarks|diffg|diffget|diffoff|diffpatch|diffpu|diffput|diffsplit|diffthis|diffu|diffupdate|dig|digraphs|di|display|dj|djump|dl|dlist|dr|drop|ds|dsearch|dsp|dsplit|earlier|echoe|echoerr|echom|echomsg|echon|e|edit|el|else|elsei|elseif|em|emenu|endfo|endfor|endf|endfunction|endfun|en|endif|endt|endtry|endw|endwhile|ene|enew|ex|exi|exit|exu|exusage|f|file|files|filetype|fina|finally|fin|find|fini|finish|fir|first|fix|fixdel|fo|fold|foldc|foldclose|folddoc|folddoclosed|foldd|folddoopen|foldo|foldopen|for|fu|fun|function|go|goto|gr|grep|grepa|grepadd|ha|hardcopy|h|help|helpf|helpfind|helpg|helpgrep|helpt|helptags|hid|hide|his|history|ia|iabbrev|iabc|iabclear|if|ij|ijump|il|ilist|imapc|imapclear|in|inorea|inoreabbrev|isearch|isp|isplit|iuna|iunabbrev|iu|iunmap|j|join|ju|jumps|k|keepalt|keepj|keepjumps|kee|keepmarks|laddb|laddbuffer|lad|laddexpr|laddf|laddfile|lan|language|la|last|later|lb|lbuffer|lc|lcd|lch|lchdir|lcl|lclose|let|left|lefta|leftabove|lex|lexpr|lf|lfile|lfir|lfirst|lgetb|lgetbuffer|lgete|lgetexpr|lg|lgetfile|lgr|lgrep|lgrepa|lgrepadd|lh|lhelpgrep|l|list|ll|lla|llast|lli|llist|lmak|lmake|lm|lmap|lmapc|lmapclear|lnew|lnewer|lne|lnext|lN|lNext|lnf|lnfile|lNf|lNfile|ln|lnoremap|lo|loadview|loc|lockmarks|lockv|lockvar|lol|lolder|lop|lopen|lpf|lpfile|lp|lprevious|lr|lrewind|ls|lt|ltag|lu|lunmap|lv|lvimgrep|lvimgrepa|lvimgrepadd|lw|lwindow|mak|make|ma|mark|marks|mat|match|menut|menutranslate|mk|mkexrc|mks|mksession|mksp|mkspell|mkvie|mkview|mkv|mkvimrc|mod|mode|m|move|mzf|mzfile|mz|mzscheme|nbkey|new|n|next|N|Next|nmapc|nmapclear|noh|nohlsearch|norea|noreabbrev|nu|number|nun|nunmap|omapc|omapclear|on|only|o|open|opt|options|ou|ounmap|pc|pclose|ped|pedit|pe|perl|perld|perldo|po|pop|popu|popu|popup|pp|ppop|pre|preserve|prev|previous|p|print|P|Print|profd|profdel|prof|profile|promptf|promptfind|promptr|promptrepl|ps|psearch|pta|ptag|ptf|ptfirst|ptj|ptjump|ptl|ptlast|ptn|ptnext|ptN|ptNext|ptp|ptprevious|ptr|ptrewind|pts|ptselect|pu|put|pw|pwd|pyf|pyfile|py|python|qa|qall|q|quit|quita|quitall|r|read|rec|recover|redi|redir|red|redo|redr|redraw|redraws|redrawstatus|reg|registers|res|resize|ret|retab|retu|return|rew|rewind|ri|right|rightb|rightbelow|rub|ruby|rubyd|rubydo|rubyf|rubyfile|ru|runtime|rv|rviminfo|sal|sall|san|sandbox|sa|sargument|sav|saveas|sba|sball|sbf|sbfirst|sbl|sblast|sbm|sbmodified|sbn|sbnext|sbN|sbNext|sbp|sbprevious|sbr|sbrewind|sb|sbuffer|scripte|scriptencoding|scrip|scriptnames|se|set|setf|setfiletype|setg|setglobal|setl|setlocal|sf|sfind|sfir|sfirst|sh|shell|sign|sil|silent|sim|simalt|sla|slast|sl|sleep|sm|smagic|sm|smap|smapc|smapclear|sme|smenu|sn|snext|sN|sNext|sni|sniff|sno|snomagic|snor|snoremap|snoreme|snoremenu|sor|sort|so|source|spelld|spelldump|spe|spellgood|spelli|spellinfo|spellr|spellrepall|spellu|spellundo|spellw|spellwrong|sp|split|spr|sprevious|sre|srewind|sta|stag|startg|startgreplace|star|startinsert|startr|startreplace|stj|stjump|st|stop|stopi|stopinsert|sts|stselect|sun|sunhide|sunm|sunmap|sus|suspend|sv|sview|syncbind|t|tab|tabc|tabclose|tabd|tabdo|tabe|tabedit|tabf|tabfind|tabfir|tabfirst|tabl|tablast|tabm|tabmove|tabnew|tabn|tabnext|tabN|tabNext|tabo|tabonly|tabp|tabprevious|tabr|tabrewind|tabs|ta|tag|tags|tc|tcl|tcld|tcldo|tclf|tclfile|te|tearoff|tf|tfirst|th|throw|tj|tjump|tl|tlast|tm|tm|tmenu|tn|tnext|tN|tNext|to|topleft|tp|tprevious|tr|trewind|try|ts|tselect|tu|tu|tunmenu|una|unabbreviate|u|undo|undoj|undojoin|undol|undolist|unh|unhide|unlet|unlo|unlockvar|unm|unmap|up|update|verb|verbose|ve|version|vert|vertical|vie|view|vim|vimgrep|vimgrepa|vimgrepadd|vi|visual|viu|viusage|vmapc|vmapclear|vne|vnew|vs|vsplit|vu|vunmap|wa|wall|wh|while|winc|wincmd|windo|winp|winpos|win|winsize|wn|wnext|wN|wNext|wp|wprevious|wq|wqa|wqall|w|write|ws|wsverb|wv|wviminfo|X|xa|xall|x|xit|xm|xmap|xmapc|xmapclear|xme|xmenu|XMLent|XMLns|xn|xnoremap|xnoreme|xnoremenu|xu|xunmap|y|yank)\b/,builtin:/\b(?:autocmd|acd|ai|akm|aleph|allowrevins|altkeymap|ambiwidth|ambw|anti|antialias|arab|arabic|arabicshape|ari|arshape|autochdir|autoindent|autoread|autowrite|autowriteall|aw|awa|background|backspace|backup|backupcopy|backupdir|backupext|backupskip|balloondelay|ballooneval|balloonexpr|bdir|bdlay|beval|bex|bexpr|bg|bh|bin|binary|biosk|bioskey|bk|bkc|bomb|breakat|brk|browsedir|bs|bsdir|bsk|bt|bufhidden|buflisted|buftype|casemap|ccv|cdpath|cedit|cfu|ch|charconvert|ci|cin|cindent|cink|cinkeys|cino|cinoptions|cinw|cinwords|clipboard|cmdheight|cmdwinheight|cmp|cms|columns|com|comments|commentstring|compatible|complete|completefunc|completeopt|consk|conskey|copyindent|cot|cpo|cpoptions|cpt|cscopepathcomp|cscopeprg|cscopequickfix|cscopetag|cscopetagorder|cscopeverbose|cspc|csprg|csqf|cst|csto|csverb|cuc|cul|cursorcolumn|cursorline|cwh|debug|deco|def|define|delcombine|dex|dg|dict|dictionary|diff|diffexpr|diffopt|digraph|dip|dir|directory|dy|ea|ead|eadirection|eb|ed|edcompatible|ef|efm|ei|ek|enc|encoding|endofline|eol|ep|equalalways|equalprg|errorbells|errorfile|errorformat|esckeys|et|eventignore|expandtab|exrc|fcl|fcs|fdc|fde|fdi|fdl|fdls|fdm|fdn|fdo|fdt|fen|fenc|fencs|fex|ff|ffs|fileencoding|fileencodings|fileformat|fileformats|fillchars|fk|fkmap|flp|fml|fmr|foldcolumn|foldenable|foldexpr|foldignore|foldlevel|foldlevelstart|foldmarker|foldmethod|foldminlines|foldnestmax|foldtext|formatexpr|formatlistpat|formatoptions|formatprg|fp|fs|fsync|ft|gcr|gd|gdefault|gfm|gfn|gfs|gfw|ghr|gp|grepformat|grepprg|gtl|gtt|guicursor|guifont|guifontset|guifontwide|guiheadroom|guioptions|guipty|guitablabel|guitabtooltip|helpfile|helpheight|helplang|hf|hh|hi|hidden|highlight|hk|hkmap|hkmapp|hkp|hl|hlg|hls|hlsearch|ic|icon|iconstring|ignorecase|im|imactivatekey|imak|imc|imcmdline|imd|imdisable|imi|iminsert|ims|imsearch|inc|include|includeexpr|incsearch|inde|indentexpr|indentkeys|indk|inex|inf|infercase|insertmode|isf|isfname|isi|isident|isk|iskeyword|isprint|joinspaces|js|key|keymap|keymodel|keywordprg|km|kmp|kp|langmap|langmenu|laststatus|lazyredraw|lbr|lcs|linebreak|lines|linespace|lisp|lispwords|listchars|loadplugins|lpl|lsp|lz|macatsui|magic|makeef|makeprg|matchpairs|matchtime|maxcombine|maxfuncdepth|maxmapdepth|maxmem|maxmempattern|maxmemtot|mco|mef|menuitems|mfd|mh|mis|mkspellmem|ml|mls|mm|mmd|mmp|mmt|modeline|modelines|modifiable|modified|more|mouse|mousef|mousefocus|mousehide|mousem|mousemodel|mouses|mouseshape|mouset|mousetime|mp|mps|msm|mzq|mzquantum|nf|nrformats|numberwidth|nuw|odev|oft|ofu|omnifunc|opendevice|operatorfunc|opfunc|osfiletype|pa|para|paragraphs|paste|pastetoggle|patchexpr|patchmode|path|pdev|penc|pex|pexpr|pfn|ph|pheader|pi|pm|pmbcs|pmbfn|popt|preserveindent|previewheight|previewwindow|printdevice|printencoding|printexpr|printfont|printheader|printmbcharset|printmbfont|printoptions|prompt|pt|pumheight|pvh|pvw|qe|quoteescape|readonly|remap|report|restorescreen|revins|rightleft|rightleftcmd|rl|rlc|ro|rs|rtp|ruf|ruler|rulerformat|runtimepath|sbo|sc|scb|scr|scroll|scrollbind|scrolljump|scrolloff|scrollopt|scs|sect|sections|secure|sel|selection|selectmode|sessionoptions|sft|shcf|shellcmdflag|shellpipe|shellquote|shellredir|shellslash|shelltemp|shelltype|shellxquote|shiftround|shiftwidth|shm|shortmess|shortname|showbreak|showcmd|showfulltag|showmatch|showmode|showtabline|shq|si|sidescroll|sidescrolloff|siso|sj|slm|smartcase|smartindent|smarttab|smc|smd|softtabstop|sol|spc|spell|spellcapcheck|spellfile|spelllang|spellsuggest|spf|spl|splitbelow|splitright|sps|sr|srr|ss|ssl|ssop|stal|startofline|statusline|stl|stmp|su|sua|suffixes|suffixesadd|sw|swapfile|swapsync|swb|swf|switchbuf|sws|sxq|syn|synmaxcol|syntax|tabline|tabpagemax|tabstop|tagbsearch|taglength|tagrelative|tagstack|tal|tb|tbi|tbidi|tbis|tbs|tenc|term|termbidi|termencoding|terse|textauto|textmode|textwidth|tgst|thesaurus|tildeop|timeout|timeoutlen|title|titlelen|titleold|titlestring|toolbar|toolbariconsize|top|tpm|tsl|tsr|ttimeout|ttimeoutlen|ttm|tty|ttybuiltin|ttyfast|ttym|ttymouse|ttyscroll|ttytype|tw|tx|uc|ul|undolevels|updatecount|updatetime|ut|vb|vbs|vdir|verbosefile|vfile|viewdir|viewoptions|viminfo|virtualedit|visualbell|vop|wak|warn|wb|wc|wcm|wd|weirdinvert|wfh|wfw|whichwrap|wi|wig|wildchar|wildcharm|wildignore|wildmenu|wildmode|wildoptions|wim|winaltkeys|window|winfixheight|winfixwidth|winheight|winminheight|winminwidth|winwidth|wiv|wiw|wm|wmh|wmnu|wmw|wop|wrap|wrapmargin|wrapscan|writeany|writebackup|writedelay|ww|noacd|noai|noakm|noallowrevins|noaltkeymap|noanti|noantialias|noar|noarab|noarabic|noarabicshape|noari|noarshape|noautochdir|noautoindent|noautoread|noautowrite|noautowriteall|noaw|noawa|nobackup|noballooneval|nobeval|nobin|nobinary|nobiosk|nobioskey|nobk|nobl|nobomb|nobuflisted|nocf|noci|nocin|nocindent|nocompatible|noconfirm|noconsk|noconskey|nocopyindent|nocp|nocscopetag|nocscopeverbose|nocst|nocsverb|nocuc|nocul|nocursorcolumn|nocursorline|nodeco|nodelcombine|nodg|nodiff|nodigraph|nodisable|noea|noeb|noed|noedcompatible|noek|noendofline|noeol|noequalalways|noerrorbells|noesckeys|noet|noex|noexpandtab|noexrc|nofen|nofk|nofkmap|nofoldenable|nogd|nogdefault|noguipty|nohid|nohidden|nohk|nohkmap|nohkmapp|nohkp|nohls|noic|noicon|noignorecase|noim|noimc|noimcmdline|noimd|noincsearch|noinf|noinfercase|noinsertmode|nois|nojoinspaces|nojs|nolazyredraw|nolbr|nolinebreak|nolisp|nolist|noloadplugins|nolpl|nolz|noma|nomacatsui|nomagic|nomh|noml|nomod|nomodeline|nomodifiable|nomodified|nomore|nomousef|nomousefocus|nomousehide|nonu|nonumber|noodev|noopendevice|nopaste|nopi|nopreserveindent|nopreviewwindow|noprompt|nopvw|noreadonly|noremap|norestorescreen|norevins|nori|norightleft|norightleftcmd|norl|norlc|noro|nors|noru|noruler|nosb|nosc|noscb|noscrollbind|noscs|nosecure|nosft|noshellslash|noshelltemp|noshiftround|noshortname|noshowcmd|noshowfulltag|noshowmatch|noshowmode|nosi|nosm|nosmartcase|nosmartindent|nosmarttab|nosmd|nosn|nosol|nospell|nosplitbelow|nosplitright|nospr|nosr|nossl|nosta|nostartofline|nostmp|noswapfile|noswf|nota|notagbsearch|notagrelative|notagstack|notbi|notbidi|notbs|notermbidi|noterse|notextauto|notextmode|notf|notgst|notildeop|notimeout|notitle|noto|notop|notr|nottimeout|nottybuiltin|nottyfast|notx|novb|novisualbell|nowa|nowarn|nowb|noweirdinvert|nowfh|nowfw|nowildmenu|nowinfixheight|nowinfixwidth|nowiv|nowmnu|nowrap|nowrapscan|nowrite|nowriteany|nowritebackup|nows|invacd|invai|invakm|invallowrevins|invaltkeymap|invanti|invantialias|invar|invarab|invarabic|invarabicshape|invari|invarshape|invautochdir|invautoindent|invautoread|invautowrite|invautowriteall|invaw|invawa|invbackup|invballooneval|invbeval|invbin|invbinary|invbiosk|invbioskey|invbk|invbl|invbomb|invbuflisted|invcf|invci|invcin|invcindent|invcompatible|invconfirm|invconsk|invconskey|invcopyindent|invcp|invcscopetag|invcscopeverbose|invcst|invcsverb|invcuc|invcul|invcursorcolumn|invcursorline|invdeco|invdelcombine|invdg|invdiff|invdigraph|invdisable|invea|inveb|inved|invedcompatible|invek|invendofline|inveol|invequalalways|inverrorbells|invesckeys|invet|invex|invexpandtab|invexrc|invfen|invfk|invfkmap|invfoldenable|invgd|invgdefault|invguipty|invhid|invhidden|invhk|invhkmap|invhkmapp|invhkp|invhls|invhlsearch|invic|invicon|invignorecase|invim|invimc|invimcmdline|invimd|invincsearch|invinf|invinfercase|invinsertmode|invis|invjoinspaces|invjs|invlazyredraw|invlbr|invlinebreak|invlisp|invlist|invloadplugins|invlpl|invlz|invma|invmacatsui|invmagic|invmh|invml|invmod|invmodeline|invmodifiable|invmodified|invmore|invmousef|invmousefocus|invmousehide|invnu|invnumber|invodev|invopendevice|invpaste|invpi|invpreserveindent|invpreviewwindow|invprompt|invpvw|invreadonly|invremap|invrestorescreen|invrevins|invri|invrightleft|invrightleftcmd|invrl|invrlc|invro|invrs|invru|invruler|invsb|invsc|invscb|invscrollbind|invscs|invsecure|invsft|invshellslash|invshelltemp|invshiftround|invshortname|invshowcmd|invshowfulltag|invshowmatch|invshowmode|invsi|invsm|invsmartcase|invsmartindent|invsmarttab|invsmd|invsn|invsol|invspell|invsplitbelow|invsplitright|invspr|invsr|invssl|invsta|invstartofline|invstmp|invswapfile|invswf|invta|invtagbsearch|invtagrelative|invtagstack|invtbi|invtbidi|invtbs|invtermbidi|invterse|invtextauto|invtextmode|invtf|invtgst|invtildeop|invtimeout|invtitle|invto|invtop|invtr|invttimeout|invttybuiltin|invttyfast|invtx|invvb|invvisualbell|invwa|invwarn|invwb|invweirdinvert|invwfh|invwfw|invwildmenu|invwinfixheight|invwinfixwidth|invwiv|invwmnu|invwrap|invwrapscan|invwrite|invwriteany|invwritebackup|invws|t_AB|t_AF|t_al|t_AL|t_bc|t_cd|t_ce|t_Ce|t_cl|t_cm|t_Co|t_cs|t_Cs|t_CS|t_CV|t_da|t_db|t_dl|t_DL|t_EI|t_F1|t_F2|t_F3|t_F4|t_F5|t_F6|t_F7|t_F8|t_F9|t_fs|t_IE|t_IS|t_k1|t_K1|t_k2|t_k3|t_K3|t_k4|t_K4|t_k5|t_K5|t_k6|t_K6|t_k7|t_K7|t_k8|t_K8|t_k9|t_K9|t_KA|t_kb|t_kB|t_KB|t_KC|t_kd|t_kD|t_KD|t_ke|t_KE|t_KF|t_KG|t_kh|t_KH|t_kI|t_KI|t_KJ|t_KK|t_kl|t_KL|t_kN|t_kP|t_kr|t_ks|t_ku|t_le|t_mb|t_md|t_me|t_mr|t_ms|t_nd|t_op|t_RI|t_RV|t_Sb|t_se|t_Sf|t_SI|t_so|t_sr|t_te|t_ti|t_ts|t_ue|t_us|t_ut|t_vb|t_ve|t_vi|t_vs|t_WP|t_WS|t_xs|t_ZH|t_ZR)\b/,number:/\b(?:0x[\da-f]+|\d+(?:\.\d+)?)\b/i,operator:/\|\||&&|[-+.]=?|[=!](?:[=~][#?]?)?|[<>]=?[#?]?|[*\/%?]|\b(?:is(?:not)?)\b/,punctuation:/[{}[\](),;:]/}; 42 | Prism.languages.yaml={scalar:{pattern:/([\-:]\s*(![^\s]+)?[ \t]*[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)[^\r\n]+(?:\3[^\r\n]+)*)/,lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:/(\s*(?:^|[:\-,[{\r\n?])[ \t]*(![^\s]+)?[ \t]*)[^\r\n{[\]},#\s]+?(?=\s*:\s)/,lookbehind:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:/([:\-,[{]\s*(![^\s]+)?[ \t]*)(\d{4}-\d\d?-\d\d?([tT]|[ \t]+)\d\d?:\d{2}:\d{2}(\.\d*)?[ \t]*(Z|[-+]\d\d?(:\d{2})?)?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(:\d{2}(\.\d*)?)?)(?=[ \t]*($|,|]|}))/m,lookbehind:!0,alias:"number"},"boolean":{pattern:/([:\-,[{]\s*(![^\s]+)?[ \t]*)(true|false)[ \t]*(?=$|,|]|})/im,lookbehind:!0,alias:"important"},"null":{pattern:/([:\-,[{]\s*(![^\s]+)?[ \t]*)(null|~)[ \t]*(?=$|,|]|})/im,lookbehind:!0,alias:"important"},string:{pattern:/([:\-,[{]\s*(![^\s]+)?[ \t]*)("(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')(?=[ \t]*($|,|]|}))/m,lookbehind:!0},number:{pattern:/([:\-,[{]\s*(![^\s]+)?[ \t]*)[+\-]?(0x[\da-f]+|0o[0-7]+|(\d+\.?\d*|\.?\d+)(e[\+\-]?\d+)?|\.inf|\.nan)[ \t]*(?=$|,|]|})/im,lookbehind:!0},tag:/![^\s]+/,important:/[&*][\w]+/,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./}; 43 | !function(){function e(e,t){return Array.prototype.slice.call((t||document).querySelectorAll(e))}function t(e,t){return t=" "+t+" ",(" "+e.className+" ").replace(/[\n\t]/g," ").indexOf(t)>-1}function n(e,n,i){for(var o,a=n.replace(/\s+/g,"").split(","),l=+e.getAttribute("data-line-offset")||0,d=r()?parseInt:parseFloat,c=d(getComputedStyle(e).lineHeight),s=0;o=a[s++];){o=o.split("-");var u=+o[0],m=+o[1]||u,h=document.createElement("div");h.textContent=Array(m-u+2).join(" \n"),h.setAttribute("aria-hidden","true"),h.className=(i||"")+" line-highlight",t(e,"line-numbers")||(h.setAttribute("data-start",u),m>u&&h.setAttribute("data-end",m)),h.style.top=(u-l-1)*c+"px",t(e,"line-numbers")?e.appendChild(h):(e.querySelector("code")||e).appendChild(h)}}function i(){var t=location.hash.slice(1);e(".temporary.line-highlight").forEach(function(e){e.parentNode.removeChild(e)});var i=(t.match(/\.([\d,-]+)$/)||[,""])[1];if(i&&!document.getElementById(t)){var r=t.slice(0,t.lastIndexOf(".")),o=document.getElementById(r);o&&(o.hasAttribute("data-line")||o.setAttribute("data-line",""),n(o,i,"temporary "),document.querySelector(".temporary.line-highlight").scrollIntoView())}}if("undefined"!=typeof self&&self.Prism&&self.document&&document.querySelector){var r=function(){var e;return function(){if("undefined"==typeof e){var t=document.createElement("div");t.style.fontSize="13px",t.style.lineHeight="1.5",t.style.padding=0,t.style.border=0,t.innerHTML=" 
 ",document.body.appendChild(t),e=38===t.offsetHeight,document.body.removeChild(t)}return e}}(),o=0;Prism.hooks.add("complete",function(t){var r=t.element.parentNode,a=r&&r.getAttribute("data-line");r&&a&&/pre/i.test(r.nodeName)&&(clearTimeout(o),e(".line-highlight",r).forEach(function(e){e.parentNode.removeChild(e)}),n(r,a),o=setTimeout(i,1))}),window.addEventListener&&window.addEventListener("hashchange",i)}}(); 44 | !function(){"undefined"!=typeof self&&self.Prism&&self.document&&Prism.hooks.add("complete",function(e){if(e.code){var t=e.element.parentNode,s=/\s*\bline-numbers\b\s*/;if(t&&/pre/i.test(t.nodeName)&&(s.test(t.className)||s.test(e.element.className))&&!e.element.querySelector(".line-numbers-rows")){s.test(e.element.className)&&(e.element.className=e.element.className.replace(s,"")),s.test(t.className)||(t.className+=" line-numbers");var n,a=e.code.match(/\n(?!$)/g),l=a?a.length+1:1,r=new Array(l+1);r=r.join(""),n=document.createElement("span"),n.setAttribute("aria-hidden","true"),n.className="line-numbers-rows",n.innerHTML=r,t.hasAttribute("data-start")&&(t.style.counterReset="linenumber "+(parseInt(t.getAttribute("data-start"),10)-1)),e.element.appendChild(n)}}})}(); 45 | -------------------------------------------------------------------------------- /include/note.php: -------------------------------------------------------------------------------- 1 | query("SELECT ID FROM note_content 91 | WHERE ID = '$id'"); 92 | if( $sql_output->num_rows > 0 ){ 93 | return true; 94 | }else{ 95 | return false; 96 | } 97 | } 98 | 99 | function newNote($username, $title='New Note'){ 100 | global $sql; 101 | if(!checkUsername($username)) return -1; 102 | if(!checkTitle($title)) return -1; 103 | 104 | $sql->query("INSERT INTO note_content (user, settings) 105 | VALUES ('$username', '{\"title\" : \"$title\" }' )"); 106 | $id = $sql->insert_id; 107 | addSingleNoteToUser($username, $id); 108 | return $id; 109 | } 110 | 111 | function newNotebook($username, $notebook){ 112 | if(!checkUsername($username)) return -1; 113 | if(!checkTitle($notebook)) return -1; 114 | 115 | addNotebookToUser($username, $notebook); 116 | } 117 | 118 | function newSubnote($username, $notebook, $title='New Note'){ 119 | global $sql; 120 | if(!checkUsername($username)) return -1; 121 | if(!checkTitle($notebook)) return -1; 122 | if(!checkTitle($title)) return -1; 123 | 124 | $sql->query("INSERT INTO note_content (user, settings) 125 | VALUES ('$username', '{\"title\" : \"$title\" }' )"); 126 | $id = $sql->insert_id; 127 | addNoteToNotebook($username, $notebook, $id); 128 | return 'ok'; 129 | } 130 | 131 | function newNoteBelow($username, $id, $title='New Note'){ 132 | global $sql, $USERNAME; 133 | if(!checkID($id)) return -1; 134 | if(!checkUsername($USERNAME)) return -1; 135 | 136 | if( hasNote($id) ){ 137 | $sql->query("INSERT INTO note_content (user, settings) 138 | VALUES ('$USERNAME', '{\"title\" : \"$title\" }' )"); 139 | $newNoteID = $sql->insert_id; 140 | addNoteToUserBelow($USERNAME, $id, $newNoteID); 141 | return 'ok'; 142 | } 143 | } 144 | 145 | function getNote($id){ 146 | global $sql; 147 | if(!checkID($id)) return -1; 148 | 149 | $sql_output = $sql->query("SELECT content FROM note_content 150 | WHERE ID = '$id'"); 151 | if( $sql_output->num_rows > 0 ){ 152 | $content = $sql_output->fetch_array()['content']; 153 | $content = str_replace("&", "&",$content); 154 | $content = str_replace("'", "'",$content); 155 | $content = str_replace("*", "\"",$content); 156 | $content = str_replace("=", "=",$content); 157 | $content = str_replace("?", "?",$content); 158 | $content = str_replace("\", "\\",$content); 159 | updateNoteAccessDate($id); 160 | return $content; 161 | 162 | }else{ 163 | return false; 164 | } 165 | } 166 | 167 | function getNoteTitle($id){ 168 | global $sql; 169 | if(!checkID($id)) return -1; 170 | 171 | $sql_output = $sql->query("SELECT settings FROM note_content 172 | WHERE ID = '$id'"); 173 | if( $sql_output->num_rows > 0 ){ 174 | return json_decode($sql_output->fetch_array()['settings'], true)['title']; 175 | }else{ 176 | return false; 177 | } 178 | } 179 | 180 | function getNoteUser($id){ 181 | global $sql; 182 | if(!checkID($id)) return -1; 183 | 184 | $sql_output = $sql->query("SELECT user FROM note_content 185 | WHERE ID = '$id'"); 186 | if( $sql_output->num_rows > 0 ){ 187 | return $sql_output->fetch_array()['user']; 188 | }else{ 189 | return false; 190 | } 191 | } 192 | 193 | function getNoteSettings($id){ 194 | global $sql; 195 | if(!checkID($id)) return -1; 196 | 197 | $sql_output = $sql->query("SELECT settings FROM note_content 198 | WHERE ID = '$id'"); 199 | if( $sql_output->num_rows > 0 ){ 200 | return $sql_output->fetch_array()['settings']; 201 | }else{ 202 | return false; 203 | } 204 | } 205 | 206 | function checkNoteUser($id, $username){ 207 | if(!checkID($id)) return -1; 208 | if(!checkUsername($username)) return -1; 209 | 210 | return getNoteUser($id) == $username; 211 | } 212 | 213 | function updateNoteModifyDate($id){ 214 | global $sql; 215 | if(!checkID($id)) return -1; 216 | 217 | if( hasNote($id) ){ 218 | $sql_output = $sql->query("SELECT settings FROM note_content 219 | WHERE ID = '$id'"); 220 | $noteSettings = json_decode($sql_output->fetch_array()['settings'], true); 221 | $noteSettings['lastmodify'] = time(); 222 | $noteSettings = json_encode_fix($noteSettings); 223 | $sql->query("UPDATE note_content SET settings = '$noteSettings' 224 | WHERE ID = '$id'"); 225 | return 'ok'; 226 | } 227 | } 228 | 229 | function updateNoteAccessDate($id){ 230 | global $sql; 231 | if(!checkID($id)) return -1; 232 | 233 | if( hasNote($id) ){ 234 | $sql_output = $sql->query("SELECT settings FROM note_content 235 | WHERE ID = '$id'"); 236 | $noteSettings = json_decode($sql_output->fetch_array()['settings'], true); 237 | $noteSettings['lastaccess'] = time(); 238 | $noteSettings = json_encode_fix($noteSettings); 239 | $sql->query("UPDATE note_content SET settings = '$noteSettings' 240 | WHERE ID = '$id'"); 241 | return 'ok'; 242 | } 243 | } 244 | 245 | function saveNote($id, $content){ 246 | global $sql; 247 | if(!checkID($id)) return -1; 248 | 249 | if( hasNote($id) ){ 250 | $content = str_replace("&", "&", $content); 251 | $content = str_replace("'", "'", $content); 252 | $content = str_replace("\"", "*", $content); 253 | $content = str_replace("=", "=", $content); 254 | $content = str_replace("?", "?", $content); 255 | $content = str_replace("\\", "\", $content); 256 | 257 | $sql->query("UPDATE note_content SET content = '$content' 258 | WHERE ID = '$id'"); 259 | updateNoteModifyDate($id); 260 | return 'ok'; 261 | } 262 | } 263 | 264 | function renameNote($id, $newname){ 265 | global $sql; 266 | if(!checkID($id)) return -1; 267 | if(!checkTitle($newname)) return -1; 268 | 269 | if( hasNote($id) ){ 270 | $sql_output = $sql->query("SELECT settings FROM note_content 271 | WHERE ID = '$id'"); 272 | $noteSettings = json_decode($sql_output->fetch_array()['settings'], true); 273 | $noteSettings['title'] = $newname; 274 | $noteSettings = json_encode_fix($noteSettings); 275 | $sql->query("UPDATE note_content SET settings = '$noteSettings' 276 | WHERE ID = '$id'"); 277 | return 'ok'; 278 | } 279 | } 280 | 281 | function cloneNote($id){ 282 | global $sql, $USERNAME; 283 | if(!checkID($id)) return -1; 284 | if(!checkUsername($USERNAME)) return -1; 285 | 286 | if( hasNote($id) ){ 287 | // $newNoteID = newNote($USERNAME, getNoteTitle($id).' - COPY'); 288 | $newTitle = getNoteTitle($id).' - COPY'; 289 | $sql->query("INSERT INTO note_content (user, settings) 290 | VALUES ('$USERNAME', '{\"title\" : \"$newTitle\" }' )"); 291 | $newNoteID = $sql->insert_id; 292 | saveNote($newNoteID, getNote($id)); 293 | addNoteToUserBelow($USERNAME, $id, $newNoteID); 294 | return 'ok'; 295 | } 296 | } 297 | 298 | function delNote($id){ 299 | global $sql, $USERNAME; 300 | if(!checkID($id)) return -1; 301 | if(!checkUsername($USERNAME)) return -1; 302 | 303 | if( hasNote($id) ){ 304 | $sql->query("DELETE FROM note_content 305 | WHERE ID = '$id'"); 306 | removeNoteFromUser($USERNAME, $id); 307 | } 308 | } 309 | 310 | function delNotebook($notebook){ 311 | global $USERNAME; 312 | if(!checkTitle($notebook)) return -1; 313 | if(!checkUsername($USERNAME)) return -1; 314 | 315 | removeNotebookFromUser($USERNAME, $notebook); 316 | } 317 | -------------------------------------------------------------------------------- /include/sql.php: -------------------------------------------------------------------------------- 1 | =')){ 22 | return json_encode($input, JSON_UNESCAPED_UNICODE); 23 | }else{ 24 | $input = json_encode_fix_array($input); 25 | return urldecode(json_encode($input)); 26 | } 27 | } 28 | 29 | function json_encode_fix_array($array){ 30 | foreach($array as $key => $value) { 31 | if(is_string($value)){ 32 | $array[$key] = urlencode($value); 33 | } 34 | if(is_array($value)){ 35 | $array[$key] = json_encode_fix_array($value); 36 | } 37 | } 38 | return $array; 39 | } 40 | 41 | 42 | $sql = new mysqli($sql_host, $sql_user, $sql_passwd, $sql_name); 43 | 44 | 45 | if( $sql->connect_errno ){ 46 | ?> 47 |

无法连接数据库,请检查你的设置。

48 |

Error: (connect_errno.') '.$sql->connect_error; ?>

49 | < 返回 50 | query("SELECT username FROM note_users 16 | WHERE username = '$username'"); 17 | if( $sql_output->num_rows > 0 ){ 18 | return true; 19 | } 20 | return false; 21 | } 22 | 23 | function hasLogin(){ 24 | global $sql, $USERNAME, $FORCESTATUS; 25 | 26 | if($FORCESTATUS == 1) return true; 27 | if($FORCESTATUS == 2) return false; 28 | 29 | if(!isset($_COOKIE['MarkNoteUser']) || !isset($_COOKIE['MarkNotePasswd'])) 30 | return false; 31 | 32 | $username = $_COOKIE['MarkNoteUser']; 33 | if(!checkUsername($username)) return -1; 34 | 35 | $sql_output = $sql->query("SELECT passwd FROM note_users 36 | WHERE username = '$username'"); 37 | if( $sql_output->num_rows > 0 ){ 38 | $truePasswd = $sql_output->fetch_array()['passwd']; 39 | }else{ 40 | return false; 41 | } 42 | 43 | if( $truePasswd == $_COOKIE['MarkNotePasswd'] ){ 44 | $sql_output = $sql->query("SELECT username FROM note_users 45 | WHERE username = '$username'"); 46 | $username = $sql_output->fetch_array()['username']; 47 | $USERNAME = $username; 48 | return true; 49 | }else{ 50 | return false; 51 | } 52 | 53 | } 54 | 55 | function register($username, $email, $passwd, $nickname){ 56 | global $sql; 57 | if(!checkUsername($username)) return -1; 58 | if(!checkEmail($email)) return -1; 59 | if(!checkTitle($nickname)) return -1; 60 | 61 | if( hasUser($username) ) 62 | exit('Username already exist'); 63 | $passwd = md5('ffffffffff'.$passwd.'蛤蛤蛤'); 64 | $sql->query("INSERT INTO note_users (username, passwd, email, settings) 65 | VALUES ('$username', '$passwd', '$email', '{\"nickname\" = \"$nickname\" }')"); 66 | } 67 | 68 | function login($username, $passwd){ 69 | global $sql, $USERNAME, $FORCESTATUS; 70 | if(!checkUsername($username)) return -1; 71 | 72 | $sql_output = $sql->query("SELECT passwd FROM note_users 73 | WHERE username = '$username'"); 74 | if( $sql_output->num_rows > 0 ){ 75 | $truePasswd = $sql_output->fetch_array()['passwd']; 76 | }else{ 77 | echo "no this user"; 78 | return -1; 79 | } 80 | if(md5('ffffffffff'.$passwd.'蛤蛤蛤') == $truePasswd){ 81 | $sql_output = $sql->query("SELECT username FROM note_users 82 | WHERE username = '$username'"); 83 | $username = $sql_output->fetch_array()['username']; 84 | setcookie('MarkNoteUser', $username, time()+604800); 85 | setcookie('MarkNotePasswd', md5('ffffffffff'.$passwd.'蛤蛤蛤'), time()+604800); 86 | $USERNAME = $username; 87 | $FORCESTATUS = 1; 88 | return 0; 89 | }else{ 90 | echo "wrong passwd"; 91 | return -1; 92 | } 93 | } 94 | 95 | function getUserEmail($username){ 96 | global $sql; 97 | if(!checkUsername($username)) return -1; 98 | 99 | $sql_output = $sql->query("SELECT email FROM note_users 100 | WHERE username = '$username'"); 101 | return $sql_output->fetch_array()['email']; 102 | } 103 | 104 | function logout(){ 105 | global $FORCESTATUS; 106 | setcookie('MarkNoteUser', '', time()-100); 107 | setcookie('MarkNotePasswd', '', time()-100); 108 | $FORCESTATUS = 2; 109 | } 110 | 111 | function addNotebookToUser($username, $notebook){ 112 | global $sql; 113 | if(!checkUsername($username)) return -1; 114 | if(!checkTitle($notebook)) return -1; 115 | 116 | $sql_output = $sql->query("SELECT notebooks FROM note_users 117 | WHERE username = '$username'"); 118 | $theNotebooks = json_decode( $sql_output->fetch_array()['notebooks'] ); 119 | if($theNotebooks){ 120 | if(!in_array(array($notebook), $theNotebooks)){ 121 | array_push($theNotebooks, array($notebook)); 122 | }else{ 123 | echo 'notebook name already exist'; 124 | return -1; 125 | } 126 | }else{ 127 | $theNotebooks = array(array($notebook)); 128 | } 129 | echo 'ok'; 130 | $theNotebooks = json_encode_fix($theNotebooks); 131 | $sql->query("UPDATE note_users SET notebooks = '$theNotebooks' 132 | WHERE username = '$username'"); 133 | 134 | } 135 | 136 | function addNoteToNotebook($username, $notebook, $id){ 137 | global $sql; 138 | if(!checkUsername($username)) return -1; 139 | if(!checkTitle($notebook)) return -1; 140 | if(!checkID($id)) return -1; 141 | 142 | $sql_output = $sql->query("SELECT notebooks FROM note_users 143 | WHERE username = '$username'"); 144 | $theNotebooks = json_decode( $sql_output->fetch_array()['notebooks'] ); 145 | if($theNotebooks){ 146 | foreach($theNotebooks as $key => $value) { 147 | if (is_array($value) && $value[0] == $notebook){ 148 | array_push($theNotebooks[$key], $id); 149 | echo 'ok'; 150 | break; 151 | } 152 | } 153 | }else{ 154 | return -2; //no such notebook 155 | } 156 | $theNotebooks = json_encode_fix($theNotebooks); 157 | $sql->query("UPDATE note_users SET notebooks = '$theNotebooks' 158 | WHERE username = '$username'"); 159 | } 160 | 161 | function addSingleNoteToUser($username, $id){ 162 | global $sql; 163 | if(!checkUsername($username)) return -1; 164 | if(!checkID($id)) return -1; 165 | 166 | $sql_output = $sql->query("SELECT notebooks FROM note_users 167 | WHERE username = '$username'"); 168 | $theNotebooks = json_decode( $sql_output->fetch_array()['notebooks'] ); 169 | if($theNotebooks){ 170 | array_push($theNotebooks, $id); 171 | }else{ 172 | $theNotebooks = array($id); 173 | } 174 | $theNotebooks = json_encode_fix($theNotebooks); 175 | $sql->query("UPDATE note_users SET notebooks = '$theNotebooks' 176 | WHERE username = '$username'"); 177 | 178 | } 179 | 180 | function getUserNotebooks($username){ 181 | global $sql; 182 | if(!checkUsername($username)) return -1; 183 | 184 | $sql_output = $sql->query("SELECT notebooks FROM note_users 185 | WHERE username = '$username'"); 186 | return json_decode( $sql_output->fetch_array()['notebooks'] ); 187 | } 188 | 189 | function getIDListFromNoteList($list){ 190 | $IDList = array(); 191 | foreach ($list as $value) { 192 | if(is_int($value)){ 193 | $IDList[] = $value; 194 | } 195 | if(is_array($value)){ 196 | foreach ($value as $value2) { 197 | if(is_int($value2)){ 198 | $IDList[] = $value2; 199 | } 200 | } 201 | } 202 | } 203 | sort($IDList); 204 | return $IDList; 205 | } 206 | 207 | function updatetUserNotebooks($username, $list){ 208 | global $sql; 209 | if(!checkUsername($username)) return -1; 210 | 211 | $oldList = getUserNotebooks($username); 212 | if( getIDListFromNoteList($oldList) == getIDListFromNoteList($list) ){ 213 | $list = json_encode_fix($list); 214 | $sql->query("UPDATE note_users SET notebooks = '$list' 215 | WHERE username = '$username'"); 216 | echo "ok"; 217 | }else{ 218 | echo "bad list"; 219 | } 220 | } 221 | 222 | function addNoteToUserBelow($username, $id, $newid){ 223 | global $sql; 224 | if(!checkUsername($username)) return -1; 225 | if(!checkID($id)) return -1; 226 | if(!checkID($newid)) return -1; 227 | 228 | $sql_output = $sql->query("SELECT notebooks FROM note_users 229 | WHERE username = '$username'"); 230 | $theNotebooks = json_decode( $sql_output->fetch_array()['notebooks'] ); 231 | if($theNotebooks){ 232 | foreach($theNotebooks as $key => $value) { 233 | if( is_int($value) && $value == $id ){ 234 | array_splice($theNotebooks, $key+1, 0, $newid); 235 | echo 'ok'; 236 | break; 237 | } 238 | if( is_array($value) ){ 239 | foreach($value as $key2 => $note) { 240 | if( is_int($note) && $note == $id){ 241 | array_splice($theNotebooks[$key], $key2+1, 0, $newid); 242 | echo 'ok'; 243 | break 2; 244 | } 245 | } 246 | } 247 | } 248 | } 249 | $theNotebooks = json_encode_fix($theNotebooks); 250 | $sql->query("UPDATE note_users SET notebooks = '$theNotebooks' 251 | WHERE username = '$username'"); 252 | } 253 | 254 | function removeNoteFromUser($username, $id){ 255 | global $sql; 256 | if(!checkUsername($username)) return -1; 257 | if(!checkID($id)) return -1; 258 | 259 | $sql_output = $sql->query("SELECT notebooks FROM note_users 260 | WHERE username = '$username'"); 261 | $theNotebooks = json_decode( $sql_output->fetch_array()['notebooks'] ); 262 | if($theNotebooks){ 263 | foreach($theNotebooks as $key => $value) { 264 | if( is_int($value) && $value == $id ){ 265 | array_splice($theNotebooks, $key, 1); 266 | echo 'ok'; 267 | break; 268 | } 269 | if( is_array($value) ){ 270 | foreach($value as $key2 => $note) { 271 | if( is_int($note) && $note == $id){ 272 | array_splice($theNotebooks[$key], $key2, 1); 273 | echo 'ok'; 274 | break 2; 275 | } 276 | } 277 | } 278 | } 279 | } 280 | $theNotebooks = json_encode_fix($theNotebooks); 281 | $sql->query("UPDATE note_users SET notebooks = '$theNotebooks' 282 | WHERE username = '$username'"); 283 | } 284 | 285 | function removeNotebookFromUser($username, $notebook){ 286 | global $sql; 287 | if(!checkUsername($username)) return -1; 288 | if(!checkTitle($notebook)) return -1; 289 | 290 | $sql_output = $sql->query("SELECT notebooks FROM note_users 291 | WHERE username = '$username'"); 292 | $theNotebooks = json_decode( $sql_output->fetch_array()['notebooks'] ); 293 | if($theNotebooks){ 294 | foreach($theNotebooks as $key => $value) { 295 | if( is_array($value) && $value[0] == $notebook ){ 296 | if( count($value) == 1 ){ 297 | array_splice($theNotebooks, $key, 1); 298 | echo 'ok'; 299 | }else{ 300 | echo 'notebook not empty'; 301 | } 302 | break; 303 | } 304 | } 305 | } 306 | $theNotebooks = json_encode_fix($theNotebooks); 307 | $sql->query("UPDATE note_users SET notebooks = '$theNotebooks' 308 | WHERE username = '$username'"); 309 | } 310 | -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | type='.$type.'
'; 21 | 22 | 23 | if( $type == 'user' ){ 24 | // echo 'load '.$type.' page ---> '; 25 | require 'user.php'; 26 | } 27 | 28 | if( $type == 'notebook' ){ 29 | // echo 'load '.$type.' page ---> '; 30 | require 'notebook.php'; 31 | } 32 | 33 | if( $type == 'note' ){ 34 | // echo 'load '.$type.' page ---> '; 35 | require 'note.php'; 36 | } 37 | 38 | if( $type == 'home' ){ 39 | if(hasLogin()){ 40 | // echo 'load '.$type.' page ---> '; 41 | require 'edit.php'; 42 | } 43 | else{ 44 | // echo 'load '.$type.' page ---> '; 45 | require 'login.php'; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /login.php: -------------------------------------------------------------------------------- 1 | 22 | 23 | 24 | 25 | 26 | MarkNote 27 | 28 | 29 | 30 | 31 | 32 | 33 |

Log In to MarkNote

34 | 35 |
36 | Enter username 37 | 38 | Enter password 39 | 40 | 41 | 42 | 43 | 44 |
45 | 46 |

No account? Register here.

47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | MarkNote 56 | 57 | 58 | 59 | 60 | 61 | 62 |

Register to MarkNote

63 | 64 |
65 | Enter username: 66 | 67 | Enter nickname: 68 | 69 | Enter password: 70 | 71 | Enter email: 72 | 73 | 74 | 75 | 76 |
77 | 78 |

Have account? Login here.

79 | 80 | 81 | 82 | 83 | 10 | --------------------------------------------------------------------------------