vltansky / IkaEasy

Chrome extention for Ikariam. WARNING: this repo is not maintained anymore. the new IkaEasy (v3) moved to a private repo
http://ikariam-easy.com/
MIT License
5 stars 2 forks source link
chrome chrome-extension extension ikariam

WARNING: this repo is not maintained anymore. the new IkaEasy (v3) moved to a private repo.

In this version, all the extension code is completely rewritten, from the extension core to each function separately. Many bugs of the old version are fixed, HUD and UI improved, some new features were added IkaEasy v3 is available at a new address.

IkaEasy

Extension stable on version 0.6.2.

IkaEasy - extension for chrome browser that add many useful features to ikariam. Make your ikariam really easier!

Table of contents

Quick start

If you're using chrome - install extension and enjoy!

Community

Keep track of development and community news.

Features:

Supported languages:

Structure:

Main files and folders:

IkaEasy/
├── css/
│   └── ikaeasy.css
├── icon/
├── images/
├── inner/
│   └── ikaeasy.js
├── langs/
├── page/
│   ├── __common.js
│   ├── attack.js
│   ├── city.js
│   ├── diplomacyAdvisor.js
│   ├── finances.js
│   ├── generalAttacksToAlly.js
│   ├── island.js
│   ├── militaryAdvisor.js
│   ├── militaryAdvisorReportView.js
│   ├── options.js
│   ├── pirateFortess.js
│   ├── resource.js
│   ├── sendIKMessage.js
│   ├── tavern.js
│   ├── topLists.js
│   ├── townHall.js
│   ├── transport.js
│   └── units.js
└── zJS/
│   ├── db.js
│   ├── lng.js
│   ├── navigation.js
│   ├── utils.js
│   ├── var.js
├── background.js
├── hotkeysPlugin.js
├── ikalogs.js
├── init.js
├── jquery.min.js
├── json.js
└── manifest.json

Adding new script

Create new file with custom name in directory page.

Default script template:

    if (typeof zJS == "undefined") {
        zJS = {};
    }

    if (typeof zJS.Page == "undefined") {
        zJS.Page = {};
    }

    zJS.Page.TEMPLATE_ID = {
        dont_refresh : false,

        init : function() {

        },

        refresh : function() {

        }
    };

zJS.Page.TEMPLATE_ID - instead TEMPLATE_ID - value of variable ikariam.templateView.id or ikariam.backgroundView.id. When this variables changes - script will be executed.

And finally add this file to manifest.json, to the end of the long line.

How it works

All scripts, that must be executed on pages are located in directory page.

Script __common.js executing on all pages.

All other pages call by changes values of ikariam.templateView.id or ikariam.backgroundView.id.

How script works

Value dont_refresh define if script must be reinitialize when page refreshed (by ikariam).

Function init calling when page execute.

Function refresh by refreshing pages (e.g city change, or by timeout).

Adding script

When adding (deleting, moving, renaming) script files, you must update information about it in manifest.json

Adding images

When adding (deleting, moving, renaming) images in directory image, you must update information about it in manifest.json

Adding translation

Files for internationalization are located here. To add a new language, create a new file in that directory.

The language has to be referenced in the /zJS/lng.js file and /manifest.json file to be picked up.

Note: The name of the file should be the two-letters ISO-639-1 language code.

Building and minifying

master is the main folder where all the file sources in readable view. dist is the folder after minifying & concating. The content of this folder goes to releasing updated in chrome web store.

Use grunt to minify, concat & etc (already configured. Just use grunt command in the root of the project).

Copyright and license

Code and documentation copyright 2014 Vlad Tansky. Code released under the MIT license.