eRepublik Plus OperaMod unleashed!

Day 746, 00:33 Published in Poland Poland by Fazi



Hello dear eCitizens, eRepublik Plusers and eRep+ OperaModders,

as you know (or not) - original eRepublik Plus doesn't work correctly with Opera browser. Of course there was release dedicated to Opera, but... there were problems with it too. You can find more about that subject at the end of the article (not everyone is interested in so technical things). Anyway it inspired me to create eRepublik Plus dedicated to Opera, based on original eRepublik Plus script, with permission of author - PeeKaBooh.

eRep+ OperaMod Installation

Downloads, issue tracker and repository available here: http://bitbucket.org/fazi/erepublik-plus-operamod/

For upgrade a script - start with step 3.
You need 7-Zip to unpack archive.
Opera 10 is recommended, 9 may not work properly.

1. To use eRep+ OperaMod you need to enable User JavaScript: Tools -> Preferences -> Advanced -> Content -> JavaScript options, and select the directory where you will put your User JavaScript files.
2. Register JSON format in Opera (if not registered) to avoid rare problems with API: Tools -> Preferences -> Advanced -> Downloads -> Add... Type application/json as MIME type, json as file extensions and select Open with Opera. Click OK twice.
3. If this is your first installation of eRep+ OperaMod - download latest "full" package from http://bitbucket.org/fazi/erepublik-plus-operamod/downloads/ and extract it to folder selected in step 1. If you are upgrading to newest version - get update pack, overwrite existing files and go to step 5.
4. Go to opera:config#UserPrefs|Exceptions Have Stacktrace and enable it. Scroll to bottom and save it.
5. Go to eRepublik and enjoy 😉

Features overview - old and new
Partially taken from original tutorial

Quick Links


Ever wanted quick access to some pages? Or tools? That's what Quick Links are for. Just enter them in configuration and you are set. You can go to specific citizen, company, organization or tool with just one click!

Wellness Calculator


On Profile page you'll get information about your tomorrow wellness using different quality food - and using your current food with colored background which indicates change of wellness. Exact wellness change is available when mouseovered. Handy, huh?

Next Super Soldier Calculator


When mousevered Super Soldier statue, you will be notified, how many trainings you need to get the next Super Soldier medal.

Prices in Gold and Price per unit on Marketplace


On Marketplace you will be informed, how much Gold cost each product in addition to price in local currency. Also you can get information about cost per unit of product - very useful when buying raw materials. Of course these two options are configured independently.

Newspaper and Forum Article Editor buffed


Always wondered how some folks out there do such a nice layouts for their newspaper and forum articles? They insert images, have various sizes of fonts, italics, underline, but no buttons for that. Well you now have that buttons. Simply select the text you want to make bold or italic or underline or of different size and you are done. Select URL of some image and click Image and you will have pictures in your articles as well. Have fun!

Articles and comments translations


Do you want to read in some foreign language which is not known by you? Bored of constantly pasting it to some translators? Now you can translate it to your native (or well-known) language with just one click. Configure your desired language in eRep+ OperaMod options and read newspapers from all over the eWorld!

Quick loading items into donate list


Maybe you are manager of large number of companies? Or head of private military group? Or you just need to donate large number of items over and over? Quick loading is just for you! Select number of items you want to put in donate list at once, press one button - and items land into donate list. No more manually dragging items one by one.

Monetary Market features


Again, in original eRepublik, you have to click, click, click to do simple task as swap currencies. Now, with eRep+ OperaMod, just click Swap currencies and you are done. It works on Show offers and Post new offer pages.

Post new offer button is now also more natural. When you were examining some rates, for instance gold to X rate and when you clicked Post new offer you actually arrived to the page with a counter offer. It offered you to sell X and buy gold instead of vice versa. eRep+ OperaMod converts that behavior and makes it more natural. If you don't share that opinion, just click Swap currencies and you can do counter offer. As simple as that.

Battlefield links


You watch some battle. Wait, someone hit for over 400! But what was nick? It was spelled with one or two 'a's? Ermm...

And here you got battlefield links - with just one click you are redirected to search page with nick shown on battlefield and you can easily get to that eSoldier.



And that's not all features - there are much more like:
- saving visited pages on markets/countries - if you were looking through Q1 weapons and switch to read private message then on returning to marketplace you will get to Q1 weapons;
- import/export settings - your friend wants to have the same cool settings as you? No problem
- list of hospitals in each region when browsing country social stats - if you want to emigrate...
- potential damage using different quality of weapons - because good soldier is well informed about damage soldier
- fixes and improvements to original functions like 'Show price in Gold' and 'Show unit price' on marketplace
and more, and more, and more - discover the potential of eRep+ OperaMod yourself!

Licensing and authorship
I'm not an author of original eRepublik Plus script, these credits goes to PeeKaBooh. Great job man!

This script 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.

Script is provided "AS IS" and WITHOUT any warranties. Use on your own responsibility.
Complete source code is publicly available on http://bitbucket.org/fazi/erepublik-plus-operamod/src/ so feel free to check for yourself.

eRep+ OperaMod uses eAPI in accordance with 6.2 eRepublik Law to deliver richer gaming experience to the eRepublik Community.

Additional required libraries:
Opera Cross-Domain XMLHttpRequest implementation by xErath - available from here, released on GNU General Public License, provided with full version of eRep+ OperaMod.

Indirect dependencies (it does NOT require installation, that's just for your information):
jQuery: available on dual GNU GPL/MIT licenses, provided by eRepublik itself
Prototype: available on MIT license, provided by eRepublik itself
Translator: available on BSD license (GPL compatible), embedded into eRepublik Plus and eRep+ OperaMod

Logo:
Serif "O" is used by the Opera Software company. Since a single letter in raster format cannot be copyrighted, this image is in the public domain.

Thanks
PeeKaBooh - for original eRepublik Plus script 😉
Andrew6w6 - for countless nights of betatesting, proposing fixes and features 😉
anglov - for help in finding bugs on Party pages 😉

You can report a bug or propose an enhacement via http://bitbucket.org/fazi/erepublik-plus-operamod/issues/


Vote, Subscribe, Spread the word

Subscribe to this newspaper to receive notifications about bug fixes, updates and new features of eRepublik Plus Opera Mod in a moment when they are released as stable.
Feel free to localize this article and PM me, so I can put a link into localized version in this article.

And paraphrasing original tutorial:
Let's help make eRepublik a better place.
A place where you can click less and do more.
Regardless of your web browser


Technicals
As mentioned on the top - there was problems with existing version of eRepublik Plus for Opera. Firefox version uses Greasemonkey functions for e.g. getting data from eAPI. Opera doesn't have them. Okay, there is a wrapper for them (available here). But here comes another restriction - it cannot make cross-domain requests due to security policy - and eAPI queries actually ARE cross-domain. Here comes xErath work into play (described here, I recommend reading the whole discussion) - with his libraries Opera can make cross-domain requests, but only from User Javascripts. If there is non-UserJS call in the execution path - script will be terminated with security exception. Obviously enabling cross-domain access for scripts on the webpages will be a big security hole.
So far, so good - but there is a catch. GM wrapper is not aware of special Opera library. You can say - "Okay, it can be modified then". Well, it cannot. It's license forbids redistribution of modified script - and that was the main blocker. Also some people reported that by modifying it some other pages get broken. Additionally - modified GM wrapper will expose it's cross-domain functionality to every other UserJS.
Moreover - errors became harder and harder to track e.g requesting data from eAPI within jQuery call - it dies because eRepublik provides own copy of jQuery - and it's not UserJS but webpage script; also it often overrides local copy of library if exists - I've got a hard night tracking it on Party page and captcha; detecting and reacting to timeouts, when eAPI is not available was also nearly impossible without modifications of original script (yes, I tried to use so much advanced constructions like wrapping the wrapper, overriding that one specific requests and even language reflection - without success). I decide to drop GM wrapper completely and write required functionality from scratch - it makes a lot of things easier, faster, safer and enables me to write some funny things like import/export settings.