added byte counter, minor changes, and bumped version

This commit is contained in:
Kevin Froman 2017-05-27 02:54:17 -05:00
parent 556cc96fe9
commit 3cfa2315f9
7 changed files with 19 additions and 24 deletions

View File

@ -37,7 +37,7 @@
<ConfirmationsSetting value="0" id="Add" />
<ConfirmationsSetting value="0" id="Remove" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">

1
app/.gitignore vendored
View File

@ -1,2 +1 @@
/build
app-release.apk

View File

@ -7,8 +7,8 @@ android {
applicationId "net.chaoswebs.snow10"
minSdkVersion 19
targetSdkVersion 25
versionCode 3
versionName "1.2"
versionCode 5
versionName "1.5"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {

View File

@ -1,19 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<!--Snow10 Electronic Invisible Ink (Android app)
Copyright (C) 2017 Kevin Froman
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="net.chaoswebs.snow10">
@ -27,7 +12,6 @@
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

View File

@ -55,12 +55,14 @@
<div class='page-header'>
<h1 class='center'>Snow10 ☃</h1>
</div>
<p class='center'><a href='help.html'>Help! I'm confused!</a></p>
<p class='center'><a href='help.html'>Help & Info</a></p>
<div id='dataArea'>
<textarea id='text' placeholder=''></textarea>
</div>
<br>
<p class='center'>Input contains <span id='countBytes'>0</span> bytes</p><br>
<div class='center'><button class='btn btn-sm btn-default dataItem' id='clearInputButton'>Clear Input <i class='fa fa-cross'></i></button></div>
<br><br>
<br>
<div class='center'>
<label>Use Zero-Width Characters <input type='checkbox' id='useZeroWidthCharacters' checked></label>
<br><br>
@ -79,7 +81,7 @@
<br>
</div>
</div>
<footer class='center'>made with <i class='fa fa-heart'></i> by <a href='https://chaoswebs.net/'>Beardog</a></footer>
<footer class='center'>An app by <a href='https://www.chaoswebs.net/'>Kevin Froman</a></footer>
<script src='./main.js'></script>
</body>
</html>

View File

@ -24,6 +24,14 @@ var w_zero = ' ';
var w_one = '\t';
function byteCountt(s) {
return encodeURI(s).split(/%..|./).length - 1;
}
$('#text').on('input', function(){
$('#countBytes').text(byteCountt($('#text').val()));
});
function showError(msg){
$.bootstrapGrowl(msg, {type: 'danger'})
}
@ -197,4 +205,5 @@ function go(mode) {
$('#clearInputButton').click(function(){
$('#text').val('');
$('#countBytes').text('0');
});

View File

@ -1,6 +1,7 @@
package net.chaoswebs.snow10;
import android.content.Intent;
import android.content.res.Configuration;
import android.net.Uri;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;