Merge branch 'web' into prod

# Conflicts:
#	.gitignore
#	README.md
#	css/styles.css
#	index.php
#	js/dictionaryBuilder.js
This commit is contained in:
Robbie Antenesse 2015-11-07 17:02:35 -07:00
commit 94fa5ea5df
12 changed files with 731 additions and 39 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
php/google/
ipa_character_picker/ ipa_character_picker/

45
PRIVACY.md Normal file
View File

@ -0,0 +1,45 @@
## Privacy Policy
This document was last updated on November 02, 2015.
This Privacy Policy governs the manner in which Lexiconga Dictionary Builder collects, uses, maintains and discloses information collected from users (each, a "User") of the http://lexicon.ga website ("Site").
### Personal identification information
We may collect personal identification information from Users in a variety of ways, including, but not limited to, when Users visit our site, register on the site, and in connection with other activities, services, features or resources we make available on our Site. Users may be asked for, as appropriate, their email address. Users may, however, use our Site anonymously. We will collect personal identification information from Users only if they voluntarily submit such information to us. Users can always refuse to supply personal identification information, except that it may prevent them from engaging in certain Site-related activities.
### Non-personal identification information
We may collect non-personal identification information about Users whenever they interact with our Site. Non-personal identification information may include the browser name, the type of computer and technical information about Users means of connection to our Site, such as the operating system and the Internet service providers utilized and other similar information.
### Web browser cookies
Our Site does not use "cookies" to enhance User experience, but it does use "local storage". User's web browser places local storage on their hard drive for record-keeping purposes and sometimes to track information about them, but we only use this to store your current dictionary. User may choose to set their web browser to refuse local storage usage, but if they do so, the Site will not function properly.
### How we use collected information
Lexiconga Dictionary Builder may collect and use Users personal information for the following purposes:
- **To run and operate our Site and personalize user experience:** We need your input to display content on the Site correctly, because it is a tool built entirely to display the content that you enter.
### How we protect your information
We protect your information by keeping your information right on your own computer where it belongs. As mentioned previously, all data is stored in your browser's "local storage".
### Sharing your personal information
We do not sell, trade, or rent Users personal identification information to others. We may share generic aggregated demographic information not linked to any personal identification information regarding visitors and users with our business partners, trusted affiliates and advertisers for the purposes outlined above.
### Electronic newsletters
If User decides to opt-in to our mailing list, they will receive emails that may include company news, updates, related product or service information, etc. We may use third party service providers to help us operate our business and the Site or administer activities on our behalf, such as sending out newsletters or surveys. We may share your information with these third parties for those limited purposes provided that you have given us your permission.
### Third party websites
Users may find advertising or other content on our Site that link to the sites and services of our partners, suppliers, advertisers, sponsors, licencors and other third parties. We do not control the content or links that appear on these sites and are not responsible for the practices employed by websites linked to or from our Site. In addition, these sites or services, including their content and links, may be constantly changing. These sites and services may have their own privacy policies and customer service policies. Browsing and interaction on any other website, including websites which have a link to our Site, is subject to that website's own terms and policies.
### Advertising
Ads appearing on our site may be delivered to Users by advertising partners, who may set cookies. These cookies allow the ad server to recognize your computer each time they send you an online advertisement to compile non personal identification information about you or others who use your computer. This information allows ad networks to, among other things, deliver targeted advertisements that they believe will be of most interest to you. This privacy policy does not cover the use of cookies by any advertisers.
### Google Adsense
Some of the ads may be served by Google. Google's use of the DART cookie enables it to serve ads to Users based on their visit to our Site and other sites on the Internet. DART uses "non personally identifiable information" and does NOT track personal information about you, such as your name, email address, physical address, etc. You may opt out of the use of the DART cookie by visiting the Google ad and content network privacy policy at [http://www.google.com/policies/technologies/ads/](http://www.google.com/policies/technologies/ads/)
### Changes to this privacy policy
Lexiconga Dictionary Builder has the discretion to update this privacy policy at any time. When we do, we will post a notification on the main page of our Site. We encourage Users to frequently check this page for any changes to stay informed about how we are helping to protect the personal information we collect. You acknowledge and agree that it is your responsibility to review this privacy policy periodically and become aware of modifications.
###Your acceptance of these terms
By using this Site, you signify your acceptance of this policy. If you do not agree to this policy, please do not use our Site. Your continued use of the Site following the posting of changes to this policy will be deemed your acceptance of those changes. This policy was originally generated using PrivacyPolicies.com and modified for our use.
### Contacting us
If you have any questions about this Privacy Policy, the practices of this site, or your dealings with this site, please contact us by email at gamedev (at) alamantus (dot) com or follow us Twitter @alamantus.

View File

@ -1,11 +1,16 @@
<<<<<<< HEAD
## What is Dictionary Builder? ## What is Dictionary Builder?
Dictionary Builder is a tool intended to help you build constructed language (conlang) dictionaries/lexicons. Dictionary Builder is a tool intended to help you build constructed language (conlang) dictionaries/lexicons.
=======
## What is Lexiconga Dictionary Builder?
Lexiconga is a tool intended to help you build constructed language (conlang) dictionaries/lexicons.
>>>>>>> web
You can enter words and definitions, and they will appear nicely formatted and in alphabetical order under your dictionary's title, where you can also sort them by part of speech. If the default parts of speech are not adequate for your conlang, you can change them to whatever parts of speech you might need. You can even enter a description or full set of language rules that you can toggle on and off below the dictionary's title! You can enter words and definitions, and they will appear nicely formatted and in alphabetical order under your dictionary's title, where you can also sort them by part of speech. If the default parts of speech are not adequate for your conlang, you can change them to whatever parts of speech you might need. You can even enter a description or full set of language rules that you can toggle on and off below the dictionary's title!
It accepts Unicode characters so you can utilize whatever typable characters you might need and [Markdown](https://help.github.com/articles/markdown-basics/) for formatting long text entries, and if you want to share or even just make a backup of your dictionary, you can export it to a single convenient file that can be easily re-imported. Your dictionary is saved to your browser's localStorage every time you make a change, which means as long as you use the same browser and don't deliberately delete it, your dictionary will always be there when you come back. It accepts Unicode characters so you can utilize whatever typable characters you might need and [Markdown](https://help.github.com/articles/markdown-basics/) for formatting long text entries, and if you want to share or even just make a backup of your dictionary, you can export it to a single convenient file that can be easily re-imported. Your dictionary is saved to your browser's localStorage every time you make a change, which means as long as you use the same browser and don't deliberately delete it, your dictionary will always be there when you come back.
## How do I use Dictionary Builder? ## How do I use Lexiconga?
### Getting Started ### Getting Started
When you have a brand new, empty dictionary, the first thing you'll probably want to do is change the title to whatever your conlang is called and add at least a little description of what your language is like or how to use it. You can do this by clicking on the Settings button, which will open up the settings screen. Here, you will find all the fields you need to update your dictionary's Name and Description/Rules. The Description/Rules text area uses [Markdown](https://help.github.com/articles/markdown-basics/) to format any text you include, so brush up on how to do basic things in Markdown before you get started _(NOTE: a line break is done by adding 2 or more spaces to the end of the line and then going to the next line!)_. After this, make sure that the Parts of Speech are adequate for your language _(see below for more information about this)_. Update these fields to what you want them to say and click the "Save" button to keep the Settings menu open, or the "Save and Close" button to close the menu and start adding words! When you have a brand new, empty dictionary, the first thing you'll probably want to do is change the title to whatever your conlang is called and add at least a little description of what your language is like or how to use it. You can do this by clicking on the Settings button, which will open up the settings screen. Here, you will find all the fields you need to update your dictionary's Name and Description/Rules. The Description/Rules text area uses [Markdown](https://help.github.com/articles/markdown-basics/) to format any text you include, so brush up on how to do basic things in Markdown before you get started _(NOTE: a line break is done by adding 2 or more spaces to the end of the line and then going to the next line!)_. After this, make sure that the Parts of Speech are adequate for your language _(see below for more information about this)_. Update these fields to what you want them to say and click the "Save" button to keep the Settings menu open, or the "Save and Close" button to close the menu and start adding words!
@ -53,6 +58,16 @@ The **Empty Current Dictionary** should only be used if you want to completely s
In the future, I'm planning to add the ability to save more than one dictionary at a time by allowing user accounts. Each account will be able to store a certain number of dictionaries and will be able to switch to any saved dictionary at any time without having to worry about exporting and importing .dict files. Along with this will also come the ability to easily share dictionaries if you want, but all dictionaries will be private by default. In the future, I'm planning to add the ability to save more than one dictionary at a time by allowing user accounts. Each account will be able to store a certain number of dictionaries and will be able to switch to any saved dictionary at any time without having to worry about exporting and importing .dict files. Along with this will also come the ability to easily share dictionaries if you want, but all dictionaries will be private by default.
## Thanks! ## Thanks!
<<<<<<< HEAD
I hope you enjoy Dictionary Builder and that it helps you build some awesome languages. I hope you enjoy Dictionary Builder and that it helps you build some awesome languages.
- Robbie Antenesse - Robbie Antenesse
=======
I hope you enjoy Lexiconga and that it helps you build some awesome languages.
Robbie Antenesse
### Libraries Used
* [Markdown.js](https://github.com/evilstreak/markdown-js) by Dominic Baggott (a.k.a. evilstreak)
* [Defiant.js](http://defiantjs.com) by Hakan Bilgin (a.k.a. hbi99)
>>>>>>> web

28
TERMS.md Normal file
View File

@ -0,0 +1,28 @@
## Terms of Service ("Terms")
Last updated: November 1, 2015.
Please read these Terms of Service ("Terms", "Terms of Service") carefully before using the http://lexicon.ga website (the "Service") operated by Robbie Antenesse and Alamantus GameDev ("us", "we", or "our").
Your access to and use of the Service is conditioned on your acceptance of and compliance with these Terms. These Terms apply to all visitors, users and others who access or use the Service. By accessing or using the Service you agree to be bound by these Terms. If you disagree with any part of the terms then you may not access the Service.
### Termination
We may terminate or suspend access to our Service immediately, without prior notice or liability, for any reason whatsoever, including without limitation if you breach the Terms. All provisions of the Terms which by their nature should survive termination shall survive termination, including, without limitation, ownership provisions, warranty disclaimers, indemnity and limitations of liability.
### Links To Other Web Sites
Our Service may contain links to third-party web sites or services that are not owned or controlled by Robbie Antenesse and Alamantus GameDev.
Robbie Antenesse and Alamantus GameDev has no control over, and assumes no responsibility for, the content, privacy policies, or practices of any third party web sites or services. You further acknowledge and agree that Robbie Antenesse and Alamantus GameDev shall not be responsible or liable, directly or indirectly, for any damage or loss caused or alleged to be caused by or in connection with use of or reliance on any such content, goods or services available on or through any such web sites or services.
We strongly advise you to read the terms and conditions and privacy policies of any third-party web sites or services that you visit.
### Governing Law
These Terms shall be governed and construed in accordance with the laws of the United States of America, without regard to its conflict of law provisions. Our failure to enforce any right or provision of these Terms will not be considered a waiver of those rights. If any provision of these Terms is held to be invalid or unenforceable by a court, the remaining provisions of these Terms will remain in effect. These Terms constitute the entire agreement between us regarding our Service, and supersede and replace any prior agreements we might have between us regarding the Service.
### Changes
We reserve the right, at our sole discretion, to modify or replace these Terms at any time. If a revision is material we will try to provide at least 5 days notice prior to any new terms taking effect. What constitutes a material change will be determined at our sole discretion.
By continuing to access or use our Service after those revisions become effective, you agree to be bound by the revised terms. If you do not agree to the new terms, please stop using the Service.
### Contact Us
If you have any questions about these Terms, please contact us by email at gamedev (at) alamantus (dot) com or follow us on Twitter @alamantus.

123
css/lexiconga.css Normal file
View File

@ -0,0 +1,123 @@
body {
background: #e6cfaa;
}
header {
height: 50px;
width: 100%;
background: #eacc9d;
margin-bottom: 3px;
border-bottom: 3px solid #e3bb7d;
}
#siteLogo {
display: block;
text-indent: -9999px;
width: 242px;
height: 48px;
background: url(../images/logo.svg);
background-size: 242px 48px;
float: left;
}
#aboutButton {
background: #dcb078;
}
#loginoutArea {
float: right;
}
#loginoutArea a {
color: #000000;
text-decoration: none;
font-size: 13px;
}
@media screen
and (min-device-width : 481px) {
#headerPadder {
padding: 1px;
}
#loginoutArea {
margin: 16px;
}
}
/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
#siteLogo {
display: block;
text-indent: -9999px;
width: 150px;
height: 30px;
background: url(../images/logo.svg);
background-size: 150px 30px;
float: left;
}
#loginoutArea {
margin: 16px 8px;
}
}
#wordEntryForm {
background: #c05d5d;
border-color: #c08d8d #b00d0d #b00d0d #c08d8d;
}
input, textarea, select, option, button {
background: #efdfc0;
}
#dictionaryContainer {
background: #bd7251;
padding: 15px;
border: outset;
border-color: #d09b84 #915237 #915237 #d09b84;
}
#dictionaryDescription, .management, #settingsOptions, #infoPage {
background: #f2d5b2;
}
.management {
border-width: 2px;
border-color: #ebbe87 #f9ecdd #f9ecdd #ebbe87;
}
#dictionaryName {
text-shadow: 2px 2px 2px #915337;
}
#dictionaryDescription {
width: 90%;
}
#loginLink, #logoutLink,
#descriptionToggle, #settingsButton,
.deleteCancelButton, .deleteConfirmButton,
#settingsScreenCloseButton, #infoScreenCloseButton {
background: #e0c19c;
}
entry {
background: #d7ad7d;
border-color: #e7cfb3 #c78b47 #c78b47 #e7cfb3;
}
.editButton {
background: #89cb89;
}
.deleteButton {
background: #cc8888;
}
footer {
background: #d69c42;
border-top: 3px solid #e3bb7d;
}

View File

@ -5,6 +5,11 @@
font-family: Georgia, 'Times New Roman', Times, serif; font-family: Georgia, 'Times New Roman', Times, serif;
} }
contents {
display: block;
width: 100%;
}
footer { footer {
width: 100%; width: 100%;
text-align: center; text-align: center;
@ -21,17 +26,34 @@ footer {
display: inline !important; display: inline !important;
} }
/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
footer {
position: relative;
clear: both;
max-height: 100%;
}
#dictionaryContainer {
margin-bottom: 15px !important;
}
}
#leftColumn { #leftColumn {
float: left; float: left;
} }
form { form {
margin: 15px;
padding: 15px; padding: 15px;
} }
#wordEntryForm { #wordEntryForm {
width: 30%;
max-width: 400px; max-width: 400px;
min-width: 260px;
margin: 15px 0 15px 15px;
border: outset 3px; border: outset 3px;
} }
@ -69,13 +91,18 @@ input[type=checkbox] {
} }
#longDefinition { #longDefinition {
width: 350px; width: 80%;
height: 200px; min-width: 260px;
height: 150px;
}
#updateConflict {
width: 260px;
} }
#errorMessage, #updateConflictMessage, #settingsErrorMessage { #errorMessage, #updateConflictMessage, #settingsErrorMessage {
display: block; display: block;
color: red; color: maroon;
font-weight: bold; font-weight: bold;
} }
@ -86,8 +113,9 @@ input[type=checkbox] {
#dictionaryContainer { #dictionaryContainer {
margin: 15px 0 36px 15px; /* bottom margin must clear footer */ margin: 15px 0 36px 15px; /* bottom margin must clear footer */
width: 50%; width: 60%;
min-width: 350px; min-width: 260px;
max-width: 600px;
float: left; float: left;
} }
@ -128,8 +156,8 @@ input[type=checkbox] {
entry { entry {
display: block; display: block;
width: 50%; width: 90%;
min-width: 300px; min-width: 200px;
padding: 10px 10px 3px; padding: 10px 10px 3px;
border: outset 3px; border: outset 3px;
margin-bottom: 5px; margin-bottom: 5px;
@ -233,7 +261,7 @@ searchTerm {
margin: 10px; margin: 10px;
} }
#settingsBackgroundFade, #aboutBackgroundFade { #settingsBackgroundFade, #infoBackgroundFade {
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
@ -243,14 +271,14 @@ searchTerm {
opacity: 0.75; opacity: 0.75;
} }
#settingsOptions, #aboutPage { #settingsOptions, #infoPage {
position: fixed; position: fixed;
top: 10%; top: 6%;
left: 10%; left: 6%;
right: 10%; right: 6%;
bottom: 10%; bottom: 6%;
min-width: 300px; min-width: 260px;
min-height: 300px; min-height: 260px;
padding: 5px 5% 5%; padding: 5px 5% 5%;
overflow-y: auto; overflow-y: auto;
overflow-x: hidden; overflow-x: hidden;
@ -260,7 +288,7 @@ searchTerm {
} }
#settingsButton, #settingsScreenCloseButton, #settingsButton, #settingsScreenCloseButton,
#settingsSaveButtons button, #aboutScreenCloseButton { #settingsSaveButtons button, #infoScreenCloseButton {
float: right; float: right;
font-size: 12px; font-size: 12px;
} }
@ -271,9 +299,14 @@ searchTerm {
margin: 0; margin: 0;
} }
#dictionaryDescriptionEdit, #dictionaryPartsOfSpeechEdit {
width: 100%;
max-width: 360px;
min-width: 200px;
}
#dictionaryDescriptionEdit { #dictionaryDescriptionEdit {
width: 280px; height: 200px;
height: 130px;
} }
#settingsErrorMessage { #settingsErrorMessage {
@ -289,6 +322,8 @@ searchTerm {
.settingsCol { .settingsCol {
display: block; display: block;
float: left; float: left;
width: 300px; width: 30%;
min-width: 260px;
max-width: 400px;
margin: 0 30px 0 0; margin: 0 30px 0 0;
} }

BIN
favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

80
images/favicon.svg Normal file
View File

@ -0,0 +1,80 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="9.0311108mm"
height="9.0311117mm"
viewBox="0 0 32 32.000003"
id="svg4162"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="favicon.svg"
inkscape:export-filename="C:\Users\Robbie\Documents\Git Repositories\DictionaryBuilder\images\favicon.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<defs
id="defs4164" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="2"
inkscape:cx="27.214321"
inkscape:cy="14.163793"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:window-width="1600"
inkscape:window-height="837"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1" />
<metadata
id="metadata4167">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-294.94889,-329.57512)">
<g
id="g4154"
transform="matrix(0.25948938,0,0,0.1819809,266.12628,316.75349)">
<path
sodipodi:nodetypes="ccccc"
inkscape:connector-curvature="0"
id="rect4136"
d="m 234.39344,70.455884 -42.42641,83.842656 -80.8927,0 42.42641,-83.842656 z"
style="opacity:1;fill:#ff5500;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
<path
sodipodi:nodetypes="ccccc"
inkscape:connector-curvature="0"
id="rect4138"
d="m 191.96703,162.45587 42.42641,83.84266 -80.8927,0 -42.42641,-83.84266 z"
style="opacity:1;fill:#ff5500;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

200
images/logo.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 36 KiB

132
images/logo_text-data.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 27 KiB

View File

@ -4,7 +4,7 @@
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title>Dictionary Builder</title> <title>Lexiconga Dictionary Builder</title>
<link href="css/styles.css" rel="stylesheet" /> <link href="css/styles.css" rel="stylesheet" />
@ -13,11 +13,18 @@
<!-- JSON Search --> <!-- JSON Search -->
<script src="js/defiant-js/defiant-latest.min.js"></script> <script src="js/defiant-js/defiant-latest.min.js"></script>
<link href="css/lexiconga.css" rel="stylesheet" />
<script src="js/dictionaryBuilder.js"></script>
<script src="js/ui.js"></script>
</head> </head>
<body> <body>
<header>
<div id="headerPadder">
<a href="/" id="siteLogo">Lexiconga Dictionary Builder</a>
<div style="float:right;margin: 16px 8px;font-size:12px;">
<span id="aboutButton" class="clickable" onclick="ShowInfo('about')">About Lexiconga</span>
</div>
</div>
</header>
<contents>
<div id="leftColumn"> <div id="leftColumn">
<form id="wordEntryForm"> <form id="wordEntryForm">
<label><span>Word</span> <label><span>Word</span>
@ -53,7 +60,7 @@
<h1 id="dictionaryName"></h1> <h1 id="dictionaryName"></h1>
<span id="descriptionToggle" onclick="ToggleDescription();">Show Description</span> <span id="descriptionToggle" class="clickable" onclick="ToggleDescription();">Show Description</span>
<div id="dictionaryDescription" style="display:none;"></div> <div id="dictionaryDescription" style="display:none;"></div>
<div id="searchArea" style="display:block;"> <div id="searchArea" style="display:block;">
@ -79,6 +86,10 @@
<div id="theDictionary"></div> <div id="theDictionary"></div>
</div> </div>
<div id="rightColumn" class="googleads" style="float:right;width:20%;max-width:300px;min-width:200px;overflow:hidden;">
<?php include_once("php/google/adsense.php"); ?>
</div>
<div id="settingsScreen" style="display:none;"> <div id="settingsScreen" style="display:none;">
<div id="settingsBackgroundFade" onclick="HideSettings()"></div> <div id="settingsBackgroundFade" onclick="HideSettings()"></div>
<div id="settingsOptions"> <div id="settingsOptions">
@ -138,17 +149,25 @@
</div> </div>
</div> </div>
<div id="aboutScreen" style="display:none;"> <div id="infoScreen" style="display:none;">
<div id="aboutBackgroundFade" onclick="HideAbout()"></div> <div id="infoBackgroundFade" onclick="HideInfo()"></div>
<div id="aboutPage"> <div id="infoPage">
<span id="aboutScreenCloseButton" class="clickable" onclick="HideAbout()">Close</span> <span id="infoScreenCloseButton" class="clickable" onclick="HideInfo()">Close</span>
<div id="aboutText"></div> <div id="infoText"></div>
</div> </div>
</div> </div>
</contents>
<footer> <footer>
<span id="aboutButton" class="clickable" onclick="ShowAbout()">About Dictionary Builder</span> Dictionary Builder only guaranteed to work with most up-to-date HTML5 browsers. <span class="clickable" onclick="ShowInfo('terms')" style="font-size:12px;">Terms</span> <span class="clickable" onclick="ShowInfo('privacy')" style="font-size:12px;">Privacy</span>
Version <script>document.write(currentVersion);</script>. Dictionary Builder only guaranteed to work with most up-to-date HTML5 browsers.
</footer> </footer>
<!-- Markdown Parser -->
<script src="js/markdown-js/markdown.min.js"></script>
<!-- JSON Search -->
<script src="js/defiant-js/defiant-latest.min.js"></script>
<!-- Main Script -->
<script src="js/dictionaryBuilder.js"></script>
<script src="js/ui.js"></script>
<?php include_once("php/google/analytics.php"); ?>
</body> </body>
</html> </html>

View File

@ -22,15 +22,29 @@ var savedScroll = {
y: 0 y: 0
} }
var aboutText, termsText, privacyText;
window.onload = function () { window.onload = function () {
LoadDictionary(); LoadDictionary();
ClearForm(); ClearForm();
GetTextFile("README.md");
GetTextFile("TERMS.md");
GetTextFile("PRIVACY.md");
}
function GetTextFile(filename) {
var readmeFileRequest = new XMLHttpRequest(); var readmeFileRequest = new XMLHttpRequest();
readmeFileRequest.open('GET', 'README.md'); readmeFileRequest.open('GET', filename);
readmeFileRequest.onreadystatechange = function() { readmeFileRequest.onreadystatechange = function() {
if (readmeFileRequest.readyState == 4 && readmeFileRequest.status == 200) { if (readmeFileRequest.readyState == 4 && readmeFileRequest.status == 200) {
document.getElementById("aboutText").innerHTML = markdown.toHTML(readmeFileRequest.responseText); if (filename == "TERMS.md") {
termsText = markdown.toHTML(readmeFileRequest.responseText);
} else if (filename == "PRIVACY.md") {
privacyText = markdown.toHTML(readmeFileRequest.responseText);
} else {
aboutText = markdown.toHTML(readmeFileRequest.responseText);
}
} }
} }
readmeFileRequest.send(); readmeFileRequest.send();