summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2011-08-12 14:20:11 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-08-12 14:20:11 -0700
commit8b84ac955328d2c5175d29fcbbf615719f1c17ef (patch)
tree2eda73c29a477e1ab56c1fdfd49b65fad57751ad
parente1fec2408b41cdbc39003398c38537ef95af94ab (diff)
parent62e55fc77bb1f507f90f9fb9d88b595756f42af1 (diff)
downloadframeworks_base-8b84ac955328d2c5175d29fcbbf615719f1c17ef.zip
frameworks_base-8b84ac955328d2c5175d29fcbbf615719f1c17ef.tar.gz
frameworks_base-8b84ac955328d2c5175d29fcbbf615719f1c17ef.tar.bz2
Merge "Remove WebDriver"
-rw-r--r--core/java/android/webkit/webdriver/By.java252
-rw-r--r--core/java/android/webkit/webdriver/WebDriver.java843
-rw-r--r--core/java/android/webkit/webdriver/WebDriverException.java38
-rw-r--r--core/java/android/webkit/webdriver/WebElement.java388
-rw-r--r--core/java/android/webkit/webdriver/WebElementNotFoundException.java41
-rw-r--r--core/java/android/webkit/webdriver/WebElementStaleException.java42
-rw-r--r--core/java/android/webkit/webdriver/WebViewClient.java125
-rw-r--r--core/java/android/webkit/webdriver/WebchromeClientWrapper.java193
-rw-r--r--core/res/res/raw/execute_script_android.js8
-rw-r--r--core/res/res/raw/find_element_android.js27
-rw-r--r--core/res/res/raw/find_elements_android.js27
-rw-r--r--core/res/res/raw/get_attribute_value_android.js26
-rw-r--r--core/res/res/raw/get_size_android.js11
-rw-r--r--core/res/res/raw/get_text_android.js21
-rw-r--r--core/res/res/raw/get_top_left_coordinates_android.js18
-rw-r--r--core/res/res/raw/get_value_of_css_property_android.js10
-rw-r--r--core/res/res/raw/is_displayed_android.js20
-rw-r--r--core/res/res/raw/is_enabled_android.js12
-rw-r--r--core/res/res/raw/is_selected_android.js10
-rw-r--r--core/res/res/raw/set_selected_android.js27
-rw-r--r--core/res/res/raw/submit_android.js29
-rw-r--r--core/res/res/raw/toggle_android.js30
-rw-r--r--core/res/res/raw/webdriver_readme.txt53
23 files changed, 0 insertions, 2251 deletions
diff --git a/core/java/android/webkit/webdriver/By.java b/core/java/android/webkit/webdriver/By.java
deleted file mode 100644
index fa4fe74..0000000
--- a/core/java/android/webkit/webdriver/By.java
+++ /dev/null
@@ -1,252 +0,0 @@
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.webkit.webdriver;
-
-import java.util.List;
-
-/**
- * Mechanism to locate elements within the DOM of the page.
- * @hide
- */
-public abstract class By {
- public abstract WebElement findElement(WebElement element);
- public abstract List<WebElement> findElements(WebElement element);
-
- /**
- * Locates an element by its HTML id attribute.
- *
- * @param id The HTML id attribute to look for.
- * @return A By instance that locates elements by their HTML id attributes.
- */
- public static By id(final String id) {
- throwIfNull(id);
- return new By() {
- @Override
- public WebElement findElement(WebElement element) {
- return element.findElementById(id);
- }
-
- @Override
- public List<WebElement> findElements(WebElement element) {
- return element.findElementsById(id); // Yes, it happens a lot.
- }
-
- @Override
- public String toString() {
- return "By.id: " + id;
- }
- };
- }
-
- /**
- * Locates an element by the matching the exact text on the HTML link.
- *
- * @param linkText The exact text to match against.
- * @return A By instance that locates elements by the text displayed by
- * the link.
- */
- public static By linkText(final String linkText) {
- throwIfNull(linkText);
- return new By() {
- @Override
- public WebElement findElement(WebElement element) {
- return element.findElementByLinkText(linkText);
- }
-
- @Override
- public List<WebElement> findElements(WebElement element) {
- return element.findElementsByLinkText(linkText);
- }
-
- @Override
- public String toString() {
- return "By.linkText: " + linkText;
- }
- };
- }
-
- /**
- * Locates an element by matching partial part of the text displayed by an
- * HTML link.
- *
- * @param linkText The text that should be contained by the text displayed
- * on the link.
- * @return A By instance that locates elements that contain the given link
- * text.
- */
- public static By partialLinkText(final String linkText) {
- throwIfNull(linkText);
- return new By() {
- @Override
- public WebElement findElement(WebElement element) {
- return element.findElementByPartialLinkText(linkText);
- }
-
- @Override
- public List<WebElement> findElements(WebElement element) {
- return element.findElementsByPartialLinkText(linkText);
- }
-
- @Override
- public String toString() {
- return "By.partialLinkText: " + linkText;
- }
- };
- }
-
- /**
- * Locates an element by matching its HTML name attribute.
- *
- * @param name The value of the HTML name attribute.
- * @return A By instance that locates elements by the HTML name attribute.
- */
- public static By name(final String name) {
- throwIfNull(name);
- return new By() {
- @Override
- public WebElement findElement(WebElement element) {
- return element.findElementByName(name);
- }
-
- @Override
- public List<WebElement> findElements(WebElement element) {
- return element.findElementsByName(name);
- }
-
- @Override
- public String toString() {
- return "By.name: " + name;
- }
- };
- }
-
- /**
- * Locates an element by matching its class name.
- * @param className The class name
- * @return A By instance that locates elements by their class name attribute.
- */
- public static By className(final String className) {
- throwIfNull(className);
- return new By() {
- @Override
- public WebElement findElement(WebElement element) {
- return element.findElementByClassName(className);
- }
-
- @Override
- public List<WebElement> findElements(WebElement element) {
- return element.findElementsByClassName(className);
- }
-
- @Override
- public String toString() {
- return "By.className: " + className;
- }
- };
- }
-
- /**
- * Locates an element by matching its css property.
- *
- * @param css The css property.
- * @return A By instance that locates elements by their css property.
- */
- public static By css(final String css) {
- throwIfNull(css);
- return new By() {
- @Override
- public WebElement findElement(WebElement element) {
- return element.findElementByCss(css);
- }
-
- @Override
- public List<WebElement> findElements(WebElement element) {
- return element.findElementsByCss(css);
- }
-
- @Override
- public String toString() {
- return "By.css: " + css;
- }
- };
- }
-
- /**
- * Locates an element by matching its HTML tag name.
- *
- * @param tagName The HTML tag name to look for.
- * @return A By instance that locates elements using the name of the
- * HTML tag.
- */
- public static By tagName(final String tagName) {
- throwIfNull(tagName);
- return new By() {
- @Override
- public WebElement findElement(WebElement element) {
- return element.findElementByTagName(tagName);
- }
-
- @Override
- public List<WebElement> findElements(WebElement element) {
- return element.findElementsByTagName(tagName);
- }
-
- @Override
- public String toString() {
- return "By.tagName: " + tagName;
- }
- };
- }
-
- /**
- * Locates an element using an XPath expression.
- *
- * <p>When using XPath, be aware that this follows standard conventions: a
- * search prefixed with "//" will search the entire document, not just the
- * children of the current node. Use ".//" to limit your search to the
- * children of this {@link android.webkit.webdriver.WebElement}.
- *
- * @param xpath The XPath expression to use.
- * @return A By instance that locates elements using the given XPath.
- */
- public static By xpath(final String xpath) {
- throwIfNull(xpath);
- return new By() {
- @Override
- public WebElement findElement(WebElement element) {
- return element.findElementByXPath(xpath);
- }
-
- @Override
- public List<WebElement> findElements(WebElement element) {
- return element.findElementsByXPath(xpath);
- }
-
- @Override
- public String toString() {
- return "By.xpath: " + xpath;
- }
- };
- }
-
- private static void throwIfNull(String argument) {
- if (argument == null) {
- throw new IllegalArgumentException(
- "Cannot find elements with null locator.");
- }
- }
-}
diff --git a/core/java/android/webkit/webdriver/WebDriver.java b/core/java/android/webkit/webdriver/WebDriver.java
deleted file mode 100644
index 79e6523..0000000
--- a/core/java/android/webkit/webdriver/WebDriver.java
+++ /dev/null
@@ -1,843 +0,0 @@
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.webkit.webdriver;
-
-import android.graphics.Point;
-import android.os.Handler;
-import android.os.Message;
-import android.os.SystemClock;
-import android.view.InputDevice;
-import android.view.KeyCharacterMap;
-import android.view.KeyEvent;
-import android.view.MotionEvent;
-import android.webkit.WebView;
-import android.webkit.WebViewCore;
-
-import com.google.android.collect.Lists;
-import com.google.android.collect.Maps;
-
-import com.android.internal.R;
-
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-/**
- * Drives a web application by controlling the WebView. This class
- * provides a DOM-like API allowing to get information about the page,
- * navigate, and interact with the web application. This is particularly useful
- * for testing a web application.
- *
- * <p/>{@link android.webkit.webdriver.WebDriver} should be created in the main
- * thread, and invoked from another thread. Here is a sample usage:
- *
- * public class WebDriverStubActivity extends Activity {
- * private WebDriver mDriver;
- *
- * public void onCreate(Bundle savedInstanceState) {
- * super.onCreate(savedInstanceState);
- * WebView view = new WebView(this);
- * mDriver = new WebDriver(view);
- * setContentView(view);
- * }
- *
- *
- * public WebDriver getDriver() {
- * return mDriver;
- * }
- *}
- *
- * public class WebDriverTest extends
- * ActivityInstrumentationTestCase2<WebDriverStubActivity>{
- * private WebDriver mDriver;
- *
- * public WebDriverTest() {
- * super(WebDriverStubActivity.class);
- * }
- *
- * protected void setUp() throws Exception {
- * super.setUp();
- * mDriver = getActivity().getDriver();
- * }
- *
- * public void testGoogle() {
- * mDriver.get("http://google.com");
- * WebElement searchBox = mDriver.findElement(By.name("q"));
- * q.sendKeys("Cheese!");
- * q.submit();
- * assertTrue(mDriver.findElements(By.partialLinkText("Cheese")).size() > 0);
- * }
- *}
- *
- * @hide
- */
-public class WebDriver {
- // Timeout for page load in milliseconds.
- private static final int LOADING_TIMEOUT = 30000;
- // Timeout for executing JavaScript in the WebView in milliseconds.
- private static final int JS_EXECUTION_TIMEOUT = 10000;
- // Timeout for the MotionEvent to be completely handled
- private static final int MOTION_EVENT_TIMEOUT = 1000;
- // Timeout for detecting a new page load
- private static final int PAGE_STARTED_LOADING = 500;
- // Timeout for handling KeyEvents
- private static final int KEY_EVENT_TIMEOUT = 2000;
-
- // Commands posted to the handler
- private static final int CMD_GET_URL = 1;
- private static final int CMD_EXECUTE_SCRIPT = 2;
- private static final int CMD_SEND_TOUCH = 3;
- private static final int CMD_SEND_KEYS = 4;
- private static final int CMD_NAV_REFRESH = 5;
- private static final int CMD_NAV_BACK = 6;
- private static final int CMD_NAV_FORWARD = 7;
- private static final int CMD_SEND_KEYCODE = 8;
- private static final int CMD_MOVE_CURSOR_RIGHTMOST_POS = 9;
- private static final int CMD_MESSAGE_RELAY_ECHO = 10;
-
- private static final String ELEMENT_KEY = "ELEMENT";
- private static final String STATUS = "status";
- private static final String VALUE = "value";
-
- private static final long MAIN_THREAD = Thread.currentThread().getId();
-
- // This is updated by a callabck from JavaScript when the result is ready.
- private String mJsResult;
-
- // Used for synchronization
- private final Object mSyncObject;
- private final Object mSyncPageLoad;
-
- // Updated when the command is done executing in the main thread.
- private volatile boolean mCommandDone;
- // Used by WebViewClientWrapper.onPageStarted() to notify that
- // a page started loading.
- private volatile boolean mPageStartedLoading;
- // Used by WebChromeClientWrapper.onProgressChanged to notify when
- // a page finished loading.
- private volatile boolean mPageFinishedLoading;
- private WebView mWebView;
- private Navigation mNavigation;
- // This WebElement represents the object document.documentElement
- private WebElement mDocumentElement;
-
-
- // This Handler runs in the main UI thread.
- private final Handler mHandler = new Handler() {
- @Override
- public void handleMessage(Message msg) {
- switch (msg.what) {
- case CMD_GET_URL:
- final String url = (String) msg.obj;
- mWebView.loadUrl(url);
- break;
- case CMD_EXECUTE_SCRIPT:
- mWebView.loadUrl("javascript:" + (String) msg.obj);
- break;
- case CMD_MESSAGE_RELAY_ECHO:
- notifyCommandDone();
- break;
- case CMD_SEND_TOUCH:
- touchScreen((Point) msg.obj);
- notifyCommandDone();
- break;
- case CMD_SEND_KEYS:
- dispatchKeys((CharSequence[]) msg.obj);
- notifyCommandDone();
- break;
- case CMD_NAV_REFRESH:
- mWebView.reload();
- break;
- case CMD_NAV_BACK:
- mWebView.goBack();
- break;
- case CMD_NAV_FORWARD:
- mWebView.goForward();
- break;
- case CMD_SEND_KEYCODE:
- dispatchKeyCodes((int[]) msg.obj);
- notifyCommandDone();
- break;
- case CMD_MOVE_CURSOR_RIGHTMOST_POS:
- moveCursorToLeftMostPos((String) msg.obj);
- notifyCommandDone();
- break;
- }
- }
- };
-
- /**
- * Error codes from the WebDriver wire protocol
- * http://code.google.com/p/selenium/wiki/JsonWireProtocol#Response_Status_Codes
- */
- private enum ErrorCode {
- SUCCESS(0),
- NO_SUCH_ELEMENT(7),
- NO_SUCH_FRAME(8),
- UNKNOWN_COMMAND(9),
- UNSUPPORTED_OPERATION(9), // Alias
- STALE_ELEMENT_REFERENCE(10),
- ELEMENT_NOT_VISISBLE(11),
- INVALID_ELEMENT_STATE(12),
- UNKNOWN_ERROR(13),
- ELEMENT_NOT_SELECTABLE(15),
- XPATH_LOOKUP_ERROR(19),
- NO_SUCH_WINDOW(23),
- INVALID_COOKIE_DOMAIN(24),
- UNABLE_TO_SET_COOKIE(25),
- MODAL_DIALOG_OPENED(26),
- MODAL_DIALOG_OPEN(27),
- SCRIPT_TIMEOUT(28);
-
- private final int mCode;
- private static ErrorCode[] values = ErrorCode.values();
-
- ErrorCode(int code) {
- this.mCode = code;
- }
-
- public int getCode() {
- return mCode;
- }
-
- public static ErrorCode get(final int intValue) {
- for (int i = 0; i < values.length; i++) {
- if (values[i].getCode() == intValue) {
- return values[i];
- }
- }
- return UNKNOWN_ERROR;
- }
- }
-
- public WebDriver(WebView webview) {
- this.mWebView = webview;
- mWebView.requestFocus();
- if (mWebView == null) {
- throw new IllegalArgumentException("WebView cannot be null");
- }
- if (!mWebView.getSettings().getJavaScriptEnabled()) {
- throw new RuntimeException("Javascript is disabled in the WebView. "
- + "Enable it to use WebDriver");
- }
- shouldRunInMainThread(true);
-
- mSyncObject = new Object();
- mSyncPageLoad = new Object();
- this.mWebView = webview;
- WebChromeClientWrapper chromeWrapper = new WebChromeClientWrapper(
- webview.getWebChromeClient(), this);
- mWebView.setWebChromeClient(chromeWrapper);
- WebViewClientWrapper viewWrapper = new WebViewClientWrapper(
- webview.getWebViewClient(), this);
- mWebView.setWebViewClient(viewWrapper);
- mWebView.addJavascriptInterface(new JavascriptResultReady(),
- "webdriver");
- mDocumentElement = new WebElement(this, "");
- mNavigation = new Navigation();
- }
-
- /**
- * @return The title of the current page, null if not set.
- */
- public String getTitle() {
- return mWebView.getTitle();
- }
-
- /**
- * Loads a URL in the WebView. This function is blocking and will return
- * when the page has finished loading.
- *
- * @param url The URL to load.
- */
- public void get(String url) {
- mNavigation.to(url);
- }
-
- /**
- * @return The source page of the currently loaded page in WebView.
- */
- public String getPageSource() {
- return (String) executeScript("return new XMLSerializer()."
- + "serializeToString(document);");
- }
-
- /**
- * Find the first {@link android.webkit.webdriver.WebElement} using the
- * given method.
- *
- * @param by The locating mechanism to use.
- * @return The first matching element on the current context.
- * @throws {@link android.webkit.webdriver.WebElementNotFoundException} if
- * no matching element was found.
- */
- public WebElement findElement(By by) {
- checkNotNull(mDocumentElement, "Load a page using WebDriver.get() "
- + "before looking for elements.");
- return by.findElement(mDocumentElement);
- }
-
- /**
- * Finds all {@link android.webkit.webdriver.WebElement} within the page
- * using the given method.
- *
- * @param by The locating mechanism to use.
- * @return A list of all {@link android.webkit.webdriver.WebElement} found,
- * or an empty list if nothing matches.
- */
- public List<WebElement> findElements(By by) {
- checkNotNull(mDocumentElement, "Load a page using WebDriver.get() "
- + "before looking for elements.");
- return by.findElements(mDocumentElement);
- }
-
- /**
- * Clears the WebView's state and closes associated views.
- */
- public void quit() {
- mWebView.clearCache(true);
- mWebView.clearFormData();
- mWebView.clearHistory();
- mWebView.clearSslPreferences();
- mWebView.clearView();
- mWebView.removeAllViewsInLayout();
- }
-
- /**
- * Executes javascript in the context of the main frame.
- *
- * If the script has a return value the following happens:
- * <ul>
- * <li>For an HTML element, this method returns a WebElement</li>
- * <li>For a decimal, a Double is returned</li>
- * <li>For non-decimal number, a Long is returned</li>
- * <li>For a boolean, a Boolean is returned</li>
- * <li>For all other cases, a String is returned</li>
- * <li>For an array, this returns a List<Object> with each object
- * following the rules above.</li>
- * <li>For an object literal this returns a Map<String, Object>. Note that
- * Object literals keys can only be Strings. Non Strings keys will
- * be filtered out.</li>
- * </ul>
- *
- * <p> Arguments must be a number, a boolean, a string a WebElement or
- * a list of any combination of the above. The arguments will be made
- * available to the javascript via the "arguments" magic variable,
- * as if the function was called via "Function.apply".
- *
- * @param script The JavaScript to execute.
- * @param args The arguments to the script. Can be any of a number, boolean,
- * string, WebElement or a List of those.
- * @return A Boolean, Long, Double, String, WebElement, List or null.
- */
- public Object executeScript(final String script, final Object... args) {
- String scriptArgs = "[" + convertToJsArgs(args) + "]";
- String injectScriptJs = getResourceAsString(R.raw.execute_script_android);
- return executeRawJavascript("(" + injectScriptJs +
- ")(" + escapeAndQuote(script) + ", " + scriptArgs + ", true)");
- }
-
- public Navigation navigate() {
- return mNavigation;
- }
-
-
- /**
- * @hide
- */
- public class Navigation {
- /* package */ Navigation () {}
-
- public void back() {
- navigate(CMD_NAV_BACK, null);
- }
-
- public void forward() {
- navigate(CMD_NAV_FORWARD, null);
- }
-
- public void to(String url) {
- navigate(CMD_GET_URL, url);
- }
-
- public void refresh() {
- navigate(CMD_NAV_REFRESH, null);
- }
-
- private void navigate(int command, String url) {
- synchronized (mSyncPageLoad) {
- mPageFinishedLoading = false;
- Message msg = mHandler.obtainMessage(command);
- msg.obj = url;
- mHandler.sendMessage(msg);
- waitForPageLoad();
- }
- }
- }
-
- /**
- * Converts the arguments passed to a JavaScript friendly format.
- *
- * @param args The arguments to convert.
- * @return Comma separated Strings containing the arguments.
- */
- /* package */ String convertToJsArgs(final Object... args) {
- StringBuilder toReturn = new StringBuilder();
- int length = args.length;
- for (int i = 0; i < length; i++) {
- toReturn.append((i > 0) ? "," : "");
- if (args[i] instanceof List<?>) {
- toReturn.append("[");
- List<Object> aList = (List<Object>) args[i];
- for (int j = 0 ; j < aList.size(); j++) {
- String comma = ((j == 0) ? "" : ",");
- toReturn.append(comma + convertToJsArgs(aList.get(j)));
- }
- toReturn.append("]");
- } else if (args[i] instanceof Map<?, ?>) {
- Map<Object, Object> aMap = (Map<Object, Object>) args[i];
- String toAdd = "{";
- for (Object key: aMap.keySet()) {
- toAdd += key + ":"
- + convertToJsArgs(aMap.get(key)) + ",";
- }
- toReturn.append(toAdd.substring(0, toAdd.length() -1) + "}");
- } else if (args[i] instanceof WebElement) {
- // WebElement are represented in JavaScript by Objects as
- // follow: {ELEMENT:"id"} where "id" refers to the id
- // of the HTML element in the javascript cache that can
- // be accessed throught bot.inject.cache.getCache_()
- toReturn.append("{\"" + ELEMENT_KEY + "\":\""
- + ((WebElement) args[i]).getId() + "\"}");
- } else if (args[i] instanceof Number || args[i] instanceof Boolean) {
- toReturn.append(String.valueOf(args[i]));
- } else if (args[i] instanceof String) {
- toReturn.append(escapeAndQuote((String) args[i]));
- } else {
- throw new IllegalArgumentException(
- "Javascript arguments can be "
- + "a Number, a Boolean, a String, a WebElement, "
- + "or a List or a Map of those. Got: "
- + ((args[i] == null) ? "null" : args[i].getClass()
- + ", value: " + args[i].toString()));
- }
- }
- return toReturn.toString();
- }
-
- /* package */ Object executeRawJavascript(final String script) {
- if (mWebView.getUrl() == null) {
- throw new WebDriverException("Cannot operate on a blank page. "
- + "Load a page using WebDriver.get().");
- }
- String result = executeCommand(CMD_EXECUTE_SCRIPT,
- "if (!window.webdriver || !window.webdriver.resultReady) {" +
- " return;" +
- "}" +
- "window.webdriver.resultReady(" + script + ")",
- JS_EXECUTION_TIMEOUT);
- if (result == null || "undefined".equals(result)) {
- return null;
- }
- try {
- JSONObject json = new JSONObject(result);
- throwIfError(json);
- Object value = json.get(VALUE);
- return convertJsonToJavaObject(value);
- } catch (JSONException e) {
- throw new RuntimeException("Failed to parse JavaScript result: "
- + result.toString(), e);
- }
- }
-
- /* package */ String getResourceAsString(final int resourceId) {
- InputStream is = mWebView.getResources().openRawResource(resourceId);
- BufferedReader br = new BufferedReader(new InputStreamReader(is));
- StringBuilder sb = new StringBuilder();
- String line = null;
- try {
- while ((line = br.readLine()) != null) {
- sb.append(line);
- }
- br.close();
- is.close();
- } catch (IOException e) {
- throw new RuntimeException("Failed to open JavaScript resource.", e);
- }
- return sb.toString();
- }
-
- /* package */ void sendTouchScreen(Point coords) {
- // Reset state
- resetPageLoadState();
- executeCommand(CMD_SEND_TOUCH, coords,LOADING_TIMEOUT);
- // Wait for the events to be fully handled
- waitForMessageRelay(MOTION_EVENT_TIMEOUT);
-
- // If a page started loading, block until page finishes loading
- waitForPageLoadIfNeeded();
- }
-
- /* package */ void resetPageLoadState() {
- synchronized (mSyncPageLoad) {
- mPageStartedLoading = false;
- mPageFinishedLoading = false;
- }
- }
-
- /* package */ void waitForPageLoadIfNeeded() {
- synchronized (mSyncPageLoad) {
- Long end = System.currentTimeMillis() + PAGE_STARTED_LOADING;
- // Wait PAGE_STARTED_LOADING milliseconds to see if we detect a
- // page load.
- while (!mPageStartedLoading && (System.currentTimeMillis() <= end)) {
- try {
- // This is notified by WebChromeClientWrapper#onProgressChanged
- // when the page finished loading.
- mSyncPageLoad.wait(PAGE_STARTED_LOADING);
- } catch (InterruptedException e) {
- new RuntimeException(e);
- }
- }
- if (mPageStartedLoading) {
- waitForPageLoad();
- }
- }
- }
-
- private void touchScreen(Point coords) {
- // Convert to screen coords
- // screen = JS x zoom - offset
- float zoom = mWebView.getScale();
- float xOffset = mWebView.getX();
- float yOffset = mWebView.getY();
- Point screenCoords = new Point( (int)(coords.x*zoom - xOffset),
- (int)(coords.y*zoom - yOffset));
-
- long downTime = SystemClock.uptimeMillis();
- MotionEvent down = MotionEvent.obtain(downTime,
- SystemClock.uptimeMillis(), MotionEvent.ACTION_DOWN, screenCoords.x,
- screenCoords.y, 0);
- down.setSource(InputDevice.SOURCE_TOUCHSCREEN);
- MotionEvent up = MotionEvent.obtain(downTime,
- SystemClock.uptimeMillis(), MotionEvent.ACTION_UP, screenCoords.x,
- screenCoords.y, 0);
- up.setSource(InputDevice.SOURCE_TOUCHSCREEN);
- // Dispatch the events to WebView
- mWebView.dispatchTouchEvent(down);
- mWebView.dispatchTouchEvent(up);
- }
-
- /* package */ void notifyPageStartedLoading() {
- synchronized (mSyncPageLoad) {
- mPageStartedLoading = true;
- mSyncPageLoad.notify();
- }
- }
-
- /* package */ void notifyPageFinishedLoading() {
- synchronized (mSyncPageLoad) {
- mPageFinishedLoading = true;
- mSyncPageLoad.notify();
- }
- }
-
- /**
- *
- * @param keys The first element of the CharSequence should be the
- * existing value in the text input, or the empty string if none.
- */
- /* package */ void sendKeys(CharSequence[] keys) {
- executeCommand(CMD_SEND_KEYS, keys, KEY_EVENT_TIMEOUT);
- // Wait for all KeyEvents to be handled
- waitForMessageRelay(KEY_EVENT_TIMEOUT);
- }
-
- /* package */ void sendKeyCodes(int[] keycodes) {
- executeCommand(CMD_SEND_KEYCODE, keycodes, KEY_EVENT_TIMEOUT);
- // Wait for all KeyEvents to be handled
- waitForMessageRelay(KEY_EVENT_TIMEOUT);
- }
-
- /* package */ void moveCursorToRightMostPosition(String value) {
- executeCommand(CMD_MOVE_CURSOR_RIGHTMOST_POS, value, KEY_EVENT_TIMEOUT);
- waitForMessageRelay(KEY_EVENT_TIMEOUT);
- }
-
- private void moveCursorToLeftMostPos(String value) {
- // If there is text, move the cursor to the rightmost position
- if (value != null && !value.equals("")) {
- long downTime = SystemClock.uptimeMillis();
- KeyEvent down = new KeyEvent(downTime, SystemClock.uptimeMillis(),
- KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_DPAD_RIGHT, 0);
- KeyEvent up = new KeyEvent(downTime, SystemClock.uptimeMillis(),
- KeyEvent.ACTION_UP, KeyEvent.KEYCODE_DPAD_RIGHT,
- value.length());
- mWebView.dispatchKeyEvent(down);
- mWebView.dispatchKeyEvent(up);
- }
- }
-
- private void dispatchKeyCodes(int[] keycodes) {
- for (int i = 0; i < keycodes.length; i++) {
- KeyEvent down = new KeyEvent(KeyEvent.ACTION_DOWN, keycodes[i]);
- KeyEvent up = new KeyEvent(KeyEvent.ACTION_UP, keycodes[i]);
- mWebView.dispatchKeyEvent(down);
- mWebView.dispatchKeyEvent(up);
- }
- }
-
- private void dispatchKeys(CharSequence[] keys) {
- KeyCharacterMap chararcterMap = KeyCharacterMap.load(
- KeyCharacterMap.VIRTUAL_KEYBOARD);
- for (int i = 0; i < keys.length; i++) {
- CharSequence s = keys[i];
- for (int j = 0; j < s.length(); j++) {
- KeyEvent[] events =
- chararcterMap.getEvents(new char[]{s.charAt(j)});
- for (KeyEvent e : events) {
- mWebView.dispatchKeyEvent(e);
- }
- }
- }
- }
-
- private void waitForMessageRelay(long timeout) {
- synchronized (mSyncObject) {
- mCommandDone = false;
- }
- Message msg = Message.obtain();
- msg.what = WebViewCore.EventHub.MESSAGE_RELAY;
- Message echo = mHandler.obtainMessage(CMD_MESSAGE_RELAY_ECHO);
- msg.obj = echo;
-
- mWebView.getWebViewCore().sendMessage(msg);
- synchronized (mSyncObject) {
- long end = System.currentTimeMillis() + timeout;
- while (!mCommandDone && (System.currentTimeMillis() <= end)) {
- try {
- // This is notifed by the mHandler when it receives the
- // MESSAGE_RELAY back
- mSyncObject.wait(timeout);
- } catch (InterruptedException e) {
- throw new RuntimeException(e);
- }
- }
- }
- }
-
- private void waitForPageLoad() {
- long endLoad = System.currentTimeMillis() + LOADING_TIMEOUT;
- while (!mPageFinishedLoading
- && (System.currentTimeMillis() <= endLoad)) {
- try {
- mSyncPageLoad.wait(LOADING_TIMEOUT);
- } catch (InterruptedException e) {
- throw new RuntimeException();
- }
- }
- }
-
- /**
- * Wraps the given string into quotes and escape existing quotes
- * and backslashes.
- * "foo" -> "\"foo\""
- * "foo\"" -> "\"foo\\\"\""
- * "fo\o" -> "\"fo\\o\""
- *
- * @param toWrap The String to wrap in quotes
- * @return a String wrapping the original String in quotes
- */
- private static String escapeAndQuote(final String toWrap) {
- StringBuilder toReturn = new StringBuilder("\"");
- for (int i = 0; i < toWrap.length(); i++) {
- char c = toWrap.charAt(i);
- if (c == '\"') {
- toReturn.append("\\\"");
- } else if (c == '\\') {
- toReturn.append("\\\\");
- } else {
- toReturn.append(c);
- }
- }
- toReturn.append("\"");
- return toReturn.toString();
- }
-
- private Object convertJsonToJavaObject(final Object toConvert) {
- try {
- if (toConvert == null
- || toConvert.equals(null)
- || "undefined".equals(toConvert)
- || "null".equals(toConvert)) {
- return null;
- } else if (toConvert instanceof Boolean) {
- return toConvert;
- } else if (toConvert instanceof Double
- || toConvert instanceof Float) {
- return Double.valueOf(String.valueOf(toConvert));
- } else if (toConvert instanceof Integer
- || toConvert instanceof Long) {
- return Long.valueOf(String.valueOf(toConvert));
- } else if (toConvert instanceof JSONArray) { // List
- return convertJsonArrayToList((JSONArray) toConvert);
- } else if (toConvert instanceof JSONObject) { // Map or WebElment
- JSONObject map = (JSONObject) toConvert;
- if (map.opt(ELEMENT_KEY) != null) { // WebElement
- return new WebElement(this, (String) map.get(ELEMENT_KEY));
- } else { // Map
- return convertJsonObjectToMap(map);
- }
- } else {
- return toConvert.toString();
- }
- } catch (JSONException e) {
- throw new RuntimeException("Failed to parse JavaScript result: "
- + toConvert.toString(), e);
- }
- }
-
- private List<Object> convertJsonArrayToList(final JSONArray json) {
- List<Object> toReturn = Lists.newArrayList();
- for (int i = 0; i < json.length(); i++) {
- try {
- toReturn.add(convertJsonToJavaObject(json.get(i)));
- } catch (JSONException e) {
- throw new RuntimeException("Failed to parse JSON: "
- + json.toString(), e);
- }
- }
- return toReturn;
- }
-
- private Map<Object, Object> convertJsonObjectToMap(final JSONObject json) {
- Map<Object, Object> toReturn = Maps.newHashMap();
- for (Iterator it = json.keys(); it.hasNext();) {
- String key = (String) it.next();
- try {
- Object value = json.get(key);
- toReturn.put(convertJsonToJavaObject(key),
- convertJsonToJavaObject(value));
- } catch (JSONException e) {
- throw new RuntimeException("Failed to parse JSON:"
- + json.toString(), e);
- }
- }
- return toReturn;
- }
-
- private void throwIfError(final JSONObject jsonObject) {
- ErrorCode status;
- String errorMsg;
- try {
- status = ErrorCode.get((Integer) jsonObject.get(STATUS));
- errorMsg = String.valueOf(jsonObject.get(VALUE));
- } catch (JSONException e) {
- throw new RuntimeException("Failed to parse JSON Object: "
- + jsonObject, e);
- }
- switch (status) {
- case SUCCESS:
- return;
- case NO_SUCH_ELEMENT:
- throw new WebElementNotFoundException("Could not find "
- + "WebElement.");
- case STALE_ELEMENT_REFERENCE:
- throw new WebElementStaleException("WebElement is stale.");
- default:
- throw new WebDriverException("Error: " + errorMsg);
- }
- }
-
- private void shouldRunInMainThread(boolean value) {
- assert (value == (MAIN_THREAD == Thread.currentThread().getId()));
- }
-
- /**
- * Interface called from JavaScript when the result is ready.
- */
- private class JavascriptResultReady {
-
- /**
- * A callback from JavaScript to Java that passes the result as a
- * parameter. This method is available from the WebView's
- * JavaScript DOM as window.webdriver.resultReady().
- *
- * @param result The result that should be sent to Java from Javascript.
- */
- public void resultReady(final String result) {
- synchronized (mSyncObject) {
- mJsResult = result;
- mCommandDone = true;
- mSyncObject.notify();
- }
- }
- }
-
- /* package */ void notifyCommandDone() {
- synchronized (mSyncObject) {
- mCommandDone = true;
- mSyncObject.notify();
- }
- }
-
- /**
- * Executes the given command by posting a message to mHandler. This thread
- * will block until the command which runs in the main thread is done.
- *
- * @param command The command to run.
- * @param arg The argument for that command.
- * @param timeout A timeout in milliseconds.
- */
- private String executeCommand(int command, final Object arg, long timeout) {
- shouldRunInMainThread(false);
- synchronized (mSyncObject) {
- mCommandDone = false;
- Message msg = mHandler.obtainMessage(command);
- msg.obj = arg;
- mHandler.sendMessage(msg);
-
- long end = System.currentTimeMillis() + timeout;
- while (!mCommandDone) {
- if (System.currentTimeMillis() >= end) {
- throw new RuntimeException("Timeout executing command: "
- + command);
- }
- try {
- mSyncObject.wait(timeout);
- } catch (InterruptedException e) {
- throw new RuntimeException(e);
- }
- }
- }
- return mJsResult;
- }
-
- private void checkNotNull(Object obj, String errosMsg) {
- if (obj == null) {
- throw new NullPointerException(errosMsg);
- }
- }
-}
diff --git a/core/java/android/webkit/webdriver/WebDriverException.java b/core/java/android/webkit/webdriver/WebDriverException.java
deleted file mode 100644
index 1a579c2..0000000
--- a/core/java/android/webkit/webdriver/WebDriverException.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.webkit.webdriver;
-
-/**
- * @hide
- */
-public class WebDriverException extends RuntimeException {
- public WebDriverException() {
- super();
- }
-
- public WebDriverException(String reason) {
- super(reason);
- }
-
- public WebDriverException(String reason, Throwable cause) {
- super(reason, cause);
- }
-
- public WebDriverException(Throwable cause) {
- super(cause);
- }
-}
diff --git a/core/java/android/webkit/webdriver/WebElement.java b/core/java/android/webkit/webdriver/WebElement.java
deleted file mode 100644
index 02c1595..0000000
--- a/core/java/android/webkit/webdriver/WebElement.java
+++ /dev/null
@@ -1,388 +0,0 @@
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.webkit.webdriver;
-
-import android.graphics.Point;
-import android.view.KeyEvent;
-
-import com.android.internal.R;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * Represents an HTML element. Typically most interactions with a web page
- * will be performed through this class.
- *
- * @hide
- */
-public class WebElement {
- private final String mId;
- private final WebDriver mDriver;
-
- private static final String LOCATOR_ID = "id";
- private static final String LOCATOR_LINK_TEXT = "linkText";
- private static final String LOCATOR_PARTIAL_LINK_TEXT = "partialLinkText";
- private static final String LOCATOR_NAME = "name";
- private static final String LOCATOR_CLASS_NAME = "className";
- private static final String LOCATOR_CSS = "css";
- private static final String LOCATOR_TAG_NAME = "tagName";
- private static final String LOCATOR_XPATH = "xpath";
-
- /**
- * Package constructor to prevent clients from creating a new WebElement
- * instance.
- *
- * <p> A WebElement represents an HTML element on the page.
- * The corresponding HTML element is stored in a JS cache in the page
- * that can be accessed through JavaScript using "bot.inject.cache".
- *
- * @param driver The WebDriver instance to use.
- * @param id The index of the HTML element in the JavaSctipt cache.
- * document.documentElement object.
- */
- /* package */ WebElement(final WebDriver driver, final String id) {
- this.mId = id;
- this.mDriver = driver;
- }
-
- /**
- * Finds the first {@link android.webkit.webdriver.WebElement} using the
- * given method.
- *
- * @param by The locating mechanism to use.
- * @return The first matching element on the current context.
- */
- public WebElement findElement(final By by) {
- return by.findElement(this);
- }
-
- /**
- * Finds all {@link android.webkit.webdriver.WebElement} within the page
- * using the given method.
- *
- * @param by The locating mechanism to use.
- * @return A list of all {@link android.webkit.webdriver.WebElement} found,
- * or an empty list if nothing matches.
- */
- public List<WebElement> findElements(final By by) {
- return by.findElements(this);
- }
-
- /**
- * Gets the visisble (i.e. not hidden by CSS) innerText of this element,
- * inlcuding sub-elements.
- *
- * @return the innerText of this element.
- * @throws {@link android.webkit.webdriver.WebElementStaleException} if this
- * element is stale, i.e. not on the current DOM.
- */
- public String getText() {
- String getText = mDriver.getResourceAsString(R.raw.get_text_android);
- return (String) executeAtom(getText, this);
- }
-
- /**
- * Gets the value of an HTML attribute for this element or the value of the
- * property with the same name if the attribute is not present. If neither
- * is set, null is returned.
- *
- * @param attribute the HTML attribute.
- * @return the value of that attribute or the value of the property with the
- * same name if the attribute is not set, or null if neither are set. For
- * boolean attribute values this will return the string "true" or "false".
- */
- public String getAttribute(String attribute) {
- String getAttribute = mDriver.getResourceAsString(
- R.raw.get_attribute_value_android);
- return (String) executeAtom(getAttribute, this, attribute);
- }
-
- /**
- * @return the tag name of this element.
- */
- public String getTagName() {
- return (String) mDriver.executeScript("return arguments[0].tagName;",
- this);
- }
-
- /**
- * @return true if this element is enabled, false otherwise.
- */
- public boolean isEnabled() {
- String isEnabled = mDriver.getResourceAsString(
- R.raw.is_enabled_android);
- return (Boolean) executeAtom(isEnabled, this);
- }
-
- /**
- * Determines whether this element is selected or not. This applies to input
- * elements such as checkboxes, options in a select, and radio buttons.
- *
- * @return True if this element is selected, false otherwise.
- */
- public boolean isSelected() {
- String isSelected = mDriver.getResourceAsString(
- R.raw.is_selected_android);
- return (Boolean) executeAtom(isSelected, this);
- }
-
- /**
- * Selects an element on the page. This works for selecting checkboxes,
- * options in a select, and radio buttons.
- */
- public void setSelected() {
- String setSelected = mDriver.getResourceAsString(
- R.raw.set_selected_android);
- executeAtom(setSelected, this);
- }
-
- /**
- * This toggles the checkboxe state from selected to not selected, or
- * from not selected to selected.
- *
- * @return True if the toggled element is selected, false otherwise.
- */
- public boolean toggle() {
- String toggle = mDriver.getResourceAsString(R.raw.toggle_android);
- return (Boolean) executeAtom(toggle, this);
- }
-
- /**
- * Sends the KeyEvents for the given sequence of characters to the
- * WebElement to simulate typing. The KeyEvents are generated using the
- * device's {@link android.view.KeyCharacterMap.VIRTUAL_KEYBOARD}.
- *
- * @param keys The keys to send to this WebElement
- */
- public void sendKeys(CharSequence... keys) {
- if (keys == null || keys.length == 0) {
- return;
- }
- click();
- mDriver.moveCursorToRightMostPosition(getAttribute("value"));
- mDriver.sendKeys(keys);
- }
-
- /**
- * Use this to send one of the key code constants defined in
- * {@link android.view.KeyEvent}
- *
- * @param keys
- */
- public void sendKeyCodes(int... keys) {
- if (keys == null || keys.length == 0) {
- return;
- }
- click();
- mDriver.moveCursorToRightMostPosition(getAttribute("value"));
- mDriver.sendKeyCodes(keys);
- }
-
- /**
- * Sends a touch event to the center coordinates of this WebElement.
- */
- public void click() {
- Point topLeft = getLocation();
- Point size = getSize();
- int jsX = topLeft.x + size.x/2;
- int jsY = topLeft.y + size.y/2;
- Point center = new Point(jsX, jsY);
- mDriver.sendTouchScreen(center);
- }
-
- /**
- * Submits the form containing this WebElement.
- */
- public void submit() {
- mDriver.resetPageLoadState();
- String submit = mDriver.getResourceAsString(R.raw.submit_android);
- executeAtom(submit, this);
- mDriver.waitForPageLoadIfNeeded();
- }
-
- /**
- * Clears the text value if this is a text entry element. Does nothing
- * otherwise.
- */
- public void clear() {
- String value = getAttribute("value");
- if (value == null || value.equals("")) {
- return;
- }
- int length = value.length();
- int[] keys = new int[length];
- for (int i = 0; i < length; i++) {
- keys[i] = KeyEvent.KEYCODE_DEL;
- }
- sendKeyCodes(keys);
- }
-
- /**
- * @return the value of the given CSS property if found, null otherwise.
- */
- public String getCssValue(String cssProperty) {
- String getCssProp = mDriver.getResourceAsString(
- R.raw.get_value_of_css_property_android);
- return (String) executeAtom(getCssProp, this, cssProperty);
- }
-
- /**
- * Gets the width and height of the rendered element.
- *
- * @return a {@link android.graphics.Point}, where Point.x represents the
- * width, and Point.y represents the height of the element.
- */
- public Point getSize() {
- String getSize = mDriver.getResourceAsString(R.raw.get_size_android);
- Map<String, Long> map = (Map<String, Long>) executeAtom(getSize, this);
- return new Point(map.get("width").intValue(),
- map.get("height").intValue());
- }
-
- /**
- * Gets the location of the top left corner of this element on the screen.
- * If the element is not visisble, this will scroll to get the element into
- * the visisble screen.
- *
- * @return a {@link android.graphics.Point} containing the x and y
- * coordinates of the top left corner of this element.
- */
- public Point getLocation() {
- String getLocation = mDriver.getResourceAsString(
- R.raw.get_top_left_coordinates_android);
- Map<String,Long> map = (Map<String, Long>) executeAtom(getLocation,
- this);
- return new Point(map.get("x").intValue(), map.get("y").intValue());
- }
-
- /**
- * @return True if the WebElement is displayed on the screen,
- * false otherwise.
- */
- public boolean isDisplayed() {
- String isDisplayed = mDriver.getResourceAsString(
- R.raw.is_displayed_android);
- return (Boolean) executeAtom(isDisplayed, this);
- }
-
- /*package*/ String getId() {
- return mId;
- }
-
- /* package */ WebElement findElementById(final String locator) {
- return findElement(LOCATOR_ID, locator);
- }
-
- /* package */ WebElement findElementByLinkText(final String linkText) {
- return findElement(LOCATOR_LINK_TEXT, linkText);
- }
-
- /* package */ WebElement findElementByPartialLinkText(
- final String linkText) {
- return findElement(LOCATOR_PARTIAL_LINK_TEXT, linkText);
- }
-
- /* package */ WebElement findElementByName(final String name) {
- return findElement(LOCATOR_NAME, name);
- }
-
- /* package */ WebElement findElementByClassName(final String className) {
- return findElement(LOCATOR_CLASS_NAME, className);
- }
-
- /* package */ WebElement findElementByCss(final String css) {
- return findElement(LOCATOR_CSS, css);
- }
-
- /* package */ WebElement findElementByTagName(final String tagName) {
- return findElement(LOCATOR_TAG_NAME, tagName);
- }
-
- /* package */ WebElement findElementByXPath(final String xpath) {
- return findElement(LOCATOR_XPATH, xpath);
- }
-
- /* package */ List<WebElement> findElementsById(final String locator) {
- return findElements(LOCATOR_ID, locator);
- }
-
- /* package */ List<WebElement> findElementsByLinkText(final String linkText) {
- return findElements(LOCATOR_LINK_TEXT, linkText);
- }
-
- /* package */ List<WebElement> findElementsByPartialLinkText(
- final String linkText) {
- return findElements(LOCATOR_PARTIAL_LINK_TEXT, linkText);
- }
-
- /* package */ List<WebElement> findElementsByName(final String name) {
- return findElements(LOCATOR_NAME, name);
- }
-
- /* package */ List<WebElement> findElementsByClassName(final String className) {
- return findElements(LOCATOR_CLASS_NAME, className);
- }
-
- /* package */ List<WebElement> findElementsByCss(final String css) {
- return findElements(LOCATOR_CSS, css);
- }
-
- /* package */ List<WebElement> findElementsByTagName(final String tagName) {
- return findElements(LOCATOR_TAG_NAME, tagName);
- }
-
- /* package */ List<WebElement> findElementsByXPath(final String xpath) {
- return findElements(LOCATOR_XPATH, xpath);
- }
-
- private Object executeAtom(final String atom, final Object... args) {
- String scriptArgs = mDriver.convertToJsArgs(args);
- return mDriver.executeRawJavascript("(" +
- atom + ")(" + scriptArgs + ")");
- }
-
- private List<WebElement> findElements(String strategy, String locator) {
- String findElements = mDriver.getResourceAsString(
- R.raw.find_elements_android);
- if (mId.equals("")) {
- return (List<WebElement>) executeAtom(findElements,
- strategy, locator);
- } else {
- return (List<WebElement>) executeAtom(findElements,
- strategy, locator, this);
- }
- }
-
- private WebElement findElement(String strategy, String locator) {
- String findElement = mDriver.getResourceAsString(
- R.raw.find_element_android);
- WebElement el;
- if (mId.equals("")) {
- el = (WebElement) executeAtom(findElement,
- strategy, locator);
- } else {
- el = (WebElement) executeAtom(findElement,
- strategy, locator, this);
- }
- if (el == null) {
- throw new WebElementNotFoundException("Could not find element "
- + "with " + strategy + ": " + locator);
- }
- return el;
- }
-}
diff --git a/core/java/android/webkit/webdriver/WebElementNotFoundException.java b/core/java/android/webkit/webdriver/WebElementNotFoundException.java
deleted file mode 100644
index e66d279..0000000
--- a/core/java/android/webkit/webdriver/WebElementNotFoundException.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.webkit.webdriver;
-
-/**
- * Thrown when a {@link android.webkit.webdriver.WebElement} is not found in the
- * DOM of the page.
- * @hide
- */
-public class WebElementNotFoundException extends RuntimeException {
-
- public WebElementNotFoundException() {
- super();
- }
-
- public WebElementNotFoundException(String reason) {
- super(reason);
- }
-
- public WebElementNotFoundException(String reason, Throwable cause) {
- super(reason, cause);
- }
-
- public WebElementNotFoundException(Throwable cause) {
- super(cause);
- }
-}
diff --git a/core/java/android/webkit/webdriver/WebElementStaleException.java b/core/java/android/webkit/webdriver/WebElementStaleException.java
deleted file mode 100644
index c59e794..0000000
--- a/core/java/android/webkit/webdriver/WebElementStaleException.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.webkit.webdriver;
-
-/**
- * Thrown when trying to access a {@link android.webkit.webdriver.WebElement}
- * that is stale. This mean that the {@link android.webkit.webdriver.WebElement}
- * is no longer present on the DOM of the page.
- * @hide
- */
-public class WebElementStaleException extends RuntimeException {
-
- public WebElementStaleException() {
- super();
- }
-
- public WebElementStaleException(String reason) {
- super(reason);
- }
-
- public WebElementStaleException(String reason, Throwable cause) {
- super(reason, cause);
- }
-
- public WebElementStaleException(Throwable cause) {
- super(cause);
- }
-}
diff --git a/core/java/android/webkit/webdriver/WebViewClient.java b/core/java/android/webkit/webdriver/WebViewClient.java
deleted file mode 100644
index c582b24..0000000
--- a/core/java/android/webkit/webdriver/WebViewClient.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.webkit.webdriver;
-
-import android.graphics.Bitmap;
-import android.net.http.SslError;
-import android.os.Message;
-import android.view.KeyEvent;
-import android.webkit.HttpAuthHandler;
-import android.webkit.SslErrorHandler;
-import android.webkit.WebResourceResponse;
-import android.webkit.WebView;
-import android.webkit.WebViewClient;
-
-/* package */ class WebViewClientWrapper extends WebViewClient {
- private final WebViewClient mDelegate;
- private final WebDriver mDriver;
-
- public WebViewClientWrapper(WebViewClient delegate, WebDriver driver) {
- if (delegate == null) {
- mDelegate = new WebViewClient();
- } else {
- mDelegate = delegate;
- }
- this.mDriver = driver;
- }
-
- @Override
- public boolean shouldOverrideUrlLoading(WebView view, String url) {
- return mDelegate.shouldOverrideUrlLoading(view, url);
- }
-
- @Override
- public void onPageStarted(WebView view, String url, Bitmap favicon) {
- mDriver.notifyPageStartedLoading();
- mDelegate.onPageStarted(view, url, favicon);
- }
-
- @Override
- public void onPageFinished(WebView view, String url) {
- mDelegate.onPageFinished(view, url);
- }
-
- @Override
- public void onLoadResource(WebView view, String url) {
- mDelegate.onLoadResource(view, url);
- }
-
- @Override
- public WebResourceResponse shouldInterceptRequest(WebView view,
- String url) {
- return mDelegate.shouldInterceptRequest(view, url);
- }
-
- @Override
- public void onTooManyRedirects(WebView view, Message cancelMsg,
- Message continueMsg) {
- mDelegate.onTooManyRedirects(view, cancelMsg, continueMsg);
- }
-
- @Override
- public void onReceivedError(WebView view, int errorCode, String description,
- String failingUrl) {
- mDelegate.onReceivedError(view, errorCode, description, failingUrl);
- }
-
- @Override
- public void onFormResubmission(WebView view, Message dontResend,
- Message resend) {
- mDelegate.onFormResubmission(view, dontResend, resend);
- }
-
- @Override
- public void doUpdateVisitedHistory(WebView view, String url,
- boolean isReload) {
- mDelegate.doUpdateVisitedHistory(view, url, isReload);
- }
-
- @Override
- public void onReceivedSslError(WebView view, SslErrorHandler handler,
- SslError error) {
- mDelegate.onReceivedSslError(view, handler, error);
- }
-
- @Override
- public void onReceivedHttpAuthRequest(WebView view, HttpAuthHandler handler,
- String host, String realm) {
- mDelegate.onReceivedHttpAuthRequest(view, handler, host, realm);
- }
-
- @Override
- public boolean shouldOverrideKeyEvent(WebView view, KeyEvent event) {
- return mDelegate.shouldOverrideKeyEvent(view, event);
- }
-
- @Override
- public void onUnhandledKeyEvent(WebView view, KeyEvent event) {
- mDelegate.onUnhandledKeyEvent(view, event);
- }
-
- @Override
- public void onScaleChanged(WebView view, float oldScale, float newScale) {
- mDelegate.onScaleChanged(view, oldScale, newScale);
- }
-
- @Override
- public void onReceivedLoginRequest(WebView view, String realm,
- String account, String args) {
- mDelegate.onReceivedLoginRequest(view, realm, account, args);
- }
-}
diff --git a/core/java/android/webkit/webdriver/WebchromeClientWrapper.java b/core/java/android/webkit/webdriver/WebchromeClientWrapper.java
deleted file mode 100644
index a9e5d19..0000000
--- a/core/java/android/webkit/webdriver/WebchromeClientWrapper.java
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.webkit.webdriver;
-
-import android.graphics.Bitmap;
-import android.net.Uri;
-import android.os.Message;
-import android.view.View;
-import android.webkit.ConsoleMessage;
-import android.webkit.GeolocationPermissions;
-import android.webkit.JsPromptResult;
-import android.webkit.JsResult;
-import android.webkit.ValueCallback;
-import android.webkit.WebChromeClient;
-import android.webkit.WebStorage;
-import android.webkit.WebView;
-
-/* package */ class WebChromeClientWrapper extends WebChromeClient {
-
- private final WebChromeClient mDelegate;
- private final WebDriver mDriver;
-
- public WebChromeClientWrapper(WebChromeClient delegate, WebDriver driver) {
- if (delegate == null) {
- this.mDelegate = new WebChromeClient();
- } else {
- this.mDelegate = delegate;
- }
- this.mDriver = driver;
- }
-
- @Override
- public void onProgressChanged(WebView view, int newProgress) {
- if (newProgress == 100) {
- mDriver.notifyPageFinishedLoading();
- }
- mDelegate.onProgressChanged(view, newProgress);
- }
-
- @Override
- public void onReceivedTitle(WebView view, String title) {
- mDelegate.onReceivedTitle(view, title);
- }
-
- @Override
- public void onReceivedIcon(WebView view, Bitmap icon) {
- mDelegate.onReceivedIcon(view, icon);
- }
-
- @Override
- public void onReceivedTouchIconUrl(WebView view, String url,
- boolean precomposed) {
- mDelegate.onReceivedTouchIconUrl(view, url, precomposed);
- }
-
- @Override
- public void onShowCustomView(View view,
- CustomViewCallback callback) {
- mDelegate.onShowCustomView(view, callback);
- }
-
- @Override
- public void onHideCustomView() {
- mDelegate.onHideCustomView();
- }
-
- @Override
- public boolean onCreateWindow(WebView view, boolean dialog,
- boolean userGesture, Message resultMsg) {
- return mDelegate.onCreateWindow(view, dialog, userGesture, resultMsg);
- }
-
- @Override
- public void onRequestFocus(WebView view) {
- mDelegate.onRequestFocus(view);
- }
-
- @Override
- public void onCloseWindow(WebView window) {
- mDelegate.onCloseWindow(window);
- }
-
- @Override
- public boolean onJsAlert(WebView view, String url, String message,
- JsResult result) {
- return mDelegate.onJsAlert(view, url, message, result);
- }
-
- @Override
- public boolean onJsConfirm(WebView view, String url, String message,
- JsResult result) {
- return mDelegate.onJsConfirm(view, url, message, result);
- }
-
- @Override
- public boolean onJsPrompt(WebView view, String url, String message,
- String defaultValue, JsPromptResult result) {
- return mDelegate.onJsPrompt(view, url, message, defaultValue, result);
- }
-
- @Override
- public boolean onJsBeforeUnload(WebView view, String url, String message,
- JsResult result) {
- return mDelegate.onJsBeforeUnload(view, url, message, result);
- }
-
- @Override
- public void onExceededDatabaseQuota(String url, String databaseIdentifier,
- long currentQuota, long estimatedSize, long totalUsedQuota,
- WebStorage.QuotaUpdater quotaUpdater) {
- mDelegate.onExceededDatabaseQuota(url, databaseIdentifier, currentQuota,
- estimatedSize, totalUsedQuota, quotaUpdater);
- }
-
- @Override
- public void onReachedMaxAppCacheSize(long spaceNeeded, long totalUsedQuota,
- WebStorage.QuotaUpdater quotaUpdater) {
- mDelegate.onReachedMaxAppCacheSize(spaceNeeded, totalUsedQuota,
- quotaUpdater);
- }
-
- @Override
- public void onGeolocationPermissionsShowPrompt(String origin,
- GeolocationPermissions.Callback callback) {
- mDelegate.onGeolocationPermissionsShowPrompt(origin, callback);
- }
-
- @Override
- public void onGeolocationPermissionsHidePrompt() {
- mDelegate.onGeolocationPermissionsHidePrompt();
- }
-
- @Override
- public boolean onJsTimeout() {
- return mDelegate.onJsTimeout();
- }
-
- @Override
- public void onConsoleMessage(String message, int lineNumber,
- String sourceID) {
- mDelegate.onConsoleMessage(message, lineNumber, sourceID);
- }
-
- @Override
- public boolean onConsoleMessage(ConsoleMessage consoleMessage) {
- return mDelegate.onConsoleMessage(consoleMessage);
- }
-
- @Override
- public Bitmap getDefaultVideoPoster() {
- return mDelegate.getDefaultVideoPoster();
- }
-
- @Override
- public View getVideoLoadingProgressView() {
- return mDelegate.getVideoLoadingProgressView();
- }
-
- @Override
- public void getVisitedHistory(ValueCallback<String[]> callback) {
- mDelegate.getVisitedHistory(callback);
- }
-
- @Override
- public void openFileChooser(ValueCallback<Uri> uploadFile,
- String acceptType) {
- mDelegate.openFileChooser(uploadFile, acceptType);
- }
-
- @Override
- public void setInstallableWebApp() {
- mDelegate.setInstallableWebApp();
- }
-
- @Override
- public void setupAutoFill(Message msg) {
- mDelegate.setupAutoFill(msg);
- }
-}
diff --git a/core/res/res/raw/execute_script_android.js b/core/res/res/raw/execute_script_android.js
deleted file mode 100644
index 84fcbd4..0000000
--- a/core/res/res/raw/execute_script_android.js
+++ /dev/null
@@ -1,8 +0,0 @@
-function(){return function(){function h(a){var b=typeof a;if(b=="object")if(a){if(a instanceof Array)return"array";else if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if(c=="[object Window]")return"object";if(c=="[object Array]"||typeof a.length=="number"&&typeof a.splice!="undefined"&&typeof a.propertyIsEnumerable!="undefined"&&!a.propertyIsEnumerable("splice"))return"array";if(c=="[object Function]"||typeof a.call!="undefined"&&typeof a.propertyIsEnumerable!="undefined"&&!a.propertyIsEnumerable("call"))return"function"}else return"null";
-else if(b=="function"&&typeof a.call=="undefined")return"object";return b}function i(a){var b=h(a);return b=="array"||b=="object"&&typeof a.length=="number"}function j(a){a=h(a);return a=="object"||a=="array"||a=="function"}var k=Date.now||function(){return+new Date};function l(a,b){function c(){}c.prototype=b.prototype;a.c=b.prototype;a.prototype=new c};function m(a){this.stack=Error().stack||"";if(a)this.message=String(a)}l(m,Error);m.prototype.name="CustomError";function n(a,b,c){var d={};for(var e in a)if(b.call(c,a[e],e,a))d[e]=a[e];return d}function o(a,b,c){var d={};for(var e in a)d[e]=b.call(c,a[e],e,a);return d}function p(a,b,c){for(var d in a)if(b.call(c,a[d],d,a))return d};function q(a,b){m.call(this,b);this.code=a;this.name=r[a]||r[13]}l(q,m);var r,s={NoSuchElementError:7,NoSuchFrameError:8,UnknownCommandError:9,StaleElementReferenceError:10,ElementNotVisibleError:11,InvalidElementStateError:12,UnknownError:13,ElementNotSelectableError:15,XPathLookupError:19,NoSuchWindowError:23,InvalidCookieDomainError:24,UnableToSetCookieError:25,ModalDialogOpenedError:26,ModalDialogOpenError:27,ScriptTimeoutError:28},t={};for(var u in s)t[s[u]]=u;r=t;
-q.prototype.toString=function(){return"["+this.name+"] "+this.message};function v(a){for(var b=1;b<arguments.length;b++){var c=String(arguments[b]).replace(/\$/g,"$$$$");a=a.replace(/\%s/,c)}return a};function w(a,b){b.unshift(a);m.call(this,v.apply(null,b));b.shift();this.b=a}l(w,m);w.prototype.name="AssertionError";function x(a,b){if(!a){var c=Array.prototype.slice.call(arguments,2),d="Assertion failed";if(b){d+=": "+b;var e=c}throw new w(""+d,e||[]);}return a};var y=Array.prototype,z=y.map?function(a,b,c){x(a.length!=null);return y.map.call(a,b,c)}:function(a,b,c){var d=a.length,e=Array(d),f=typeof a=="string"?a.split(""):a;for(var g=0;g<d;g++)if(g in f)e[g]=b.call(c,f[g],g,a);return e};var A="",B;if(B=/WebKit\/(\S+)/){var C=B.exec(this.navigator?this.navigator.userAgent:null);A=C?C[1]:""};function D(){}
-function E(a,b,c){switch(typeof b){case "string":F(a,b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==null){c.push("null");break}if(h(b)=="array"){var d=b.length;c.push("[");var e="";for(var f=0;f<d;f++){c.push(e);E(a,b[f],c);e=","}c.push("]");break}c.push("{");d="";for(e in b)if(Object.prototype.hasOwnProperty.call(b,e)){f=b[e];if(typeof f!="function"){c.push(d);F(a,e,c);c.push(":");E(a,
-f,c);d=","}}c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var G={'"':'\\"',"\\":"\\\\","/":"\\/","\u0008":"\\b","\u000c":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\u000b":"\\u000b"},H=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g;
-function F(a,b,c){c.push('"',b.replace(H,function(d){if(d in G)return G[d];var e=d.charCodeAt(0),f="\\u";if(e<16)f+="000";else if(e<256)f+="00";else if(e<4096)f+="0";return G[d]=f+e.toString(16)}),'"')};function I(a){switch(h(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return z(a,I);case "object":a=a;if("nodeType"in a&&(a.nodeType==1||a.nodeType==9)){var b={};b.ELEMENT=J(a);return b}if(i(a))return z(a,I);a=n(a,function(c,d){return typeof d=="number"||typeof d=="string"});return o(a,I);default:return null}}
-function K(a,b){if(h(a)=="array")return z(a,function(c){return K(c,b)});else if(j(a))return"ELEMENT"in a?L(a.ELEMENT,b):o(a,function(c){return K(c,b)});return a}function M(a){a=a||document;var b=a.$wdc_;if(!b){b=a.$wdc_={};b.a=k()}return b}function J(a){var b=M(a.ownerDocument),c=p(b,function(d){return d==a});if(!c){c=":wdc:"+b.a++;b[c]=a}return c}
-function L(a,b){a=decodeURIComponent(a);var c=b||document,d=M(c);if(!(a in d))throw new q(10,"Element does not exist in cache");var e=d[a];for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new q(10,"Element is no longer attached to the DOM");};function N(a,b,c){var d;try{if(typeof a=="string")a=new Function(a);var e=K(b),f=a.apply(null,e);d={status:0,value:I(f)}}catch(g){d={status:"code"in g?g.code:13,value:{message:g.message}}}if(c){a=[];E(new D,d,a);d=a.join("")}else d=d;return d}var O="_".split("."),P=this;!(O[0]in P)&&P.execScript&&P.execScript("var "+O[0]);for(var Q;O.length&&(Q=O.shift());)if(!O.length&&N!==undefined)P[Q]=N;else P=P[Q]?P[Q]:P[Q]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!='undefined'?window.navigator:null}, arguments);}
diff --git a/core/res/res/raw/find_element_android.js b/core/res/res/raw/find_element_android.js
deleted file mode 100644
index c62f851..0000000
--- a/core/res/res/raw/find_element_android.js
+++ /dev/null
@@ -1,27 +0,0 @@
-function(){return function(){var i=this;
-function j(a){var b=typeof a;if(b=="object")if(a){if(a instanceof Array)return"array";else if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if(c=="[object Window]")return"object";if(c=="[object Array]"||typeof a.length=="number"&&typeof a.splice!="undefined"&&typeof a.propertyIsEnumerable!="undefined"&&!a.propertyIsEnumerable("splice"))return"array";if(c=="[object Function]"||typeof a.call!="undefined"&&typeof a.propertyIsEnumerable!="undefined"&&!a.propertyIsEnumerable("call"))return"function"}else return"null";else if(b==
-"function"&&typeof a.call=="undefined")return"object";return b}function aa(a){var b=j(a);return b=="array"||b=="object"&&typeof a.length=="number"}function k(a){return typeof a=="string"}function l(a){return j(a)=="function"}function ba(a){a=j(a);return a=="object"||a=="array"||a=="function"}var ca=Date.now||function(){return+new Date};function m(a,b){function c(){}c.prototype=b.prototype;a.n=b.prototype;a.prototype=new c};function n(a){this.stack=Error().stack||"";if(a)this.message=String(a)}m(n,Error);n.prototype.name="CustomError";function da(a,b,c){var d={};for(var f in a)if(b.call(c,a[f],f,a))d[f]=a[f];return d}function ea(a,b,c){var d={};for(var f in a)d[f]=b.call(c,a[f],f,a);return d}function fa(a,b,c){for(var d in a)if(b.call(c,a[d],d,a))return d};function o(a,b){n.call(this,b);this.code=a;this.name=p[a]||p[13]}m(o,n);var p,ga={NoSuchElementError:7,NoSuchFrameError:8,UnknownCommandError:9,StaleElementReferenceError:10,ElementNotVisibleError:11,InvalidElementStateError:12,UnknownError:13,ElementNotSelectableError:15,XPathLookupError:19,NoSuchWindowError:23,InvalidCookieDomainError:24,UnableToSetCookieError:25,ModalDialogOpenedError:26,ModalDialogOpenError:27,ScriptTimeoutError:28},ha={};for(var ia in ga)ha[ga[ia]]=ia;p=ha;
-o.prototype.toString=function(){return"["+this.name+"] "+this.message};function ja(a){for(var b=1;b<arguments.length;b++){var c=String(arguments[b]).replace(/\$/g,"$$$$");a=a.replace(/\%s/,c)}return a}function q(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")}function r(a,b){if(a<b)return-1;else if(a>b)return 1;return 0}var ka={};function la(a){return ka[a]||(ka[a]=String(a).replace(/\-([a-z])/g,function(b,c){return c.toUpperCase()}))};function s(a,b){b.unshift(a);n.call(this,ja.apply(null,b));b.shift();this.q=a}m(s,n);s.prototype.name="AssertionError";function t(a,b){if(!a){var c=Array.prototype.slice.call(arguments,2),d="Assertion failed";if(b){d+=": "+b;var f=c}throw new s(""+d,f||[]);}return a};var u=Array.prototype,ma=u.indexOf?function(a,b,c){t(a.length!=null);return u.indexOf.call(a,b,c)}:function(a,b,c){c=c==null?0:c<0?Math.max(0,a.length+c):c;if(k(a)){if(!k(b)||b.length!=1)return-1;return a.indexOf(b,c)}for(c=c;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1},na=u.forEach?function(a,b,c){t(a.length!=null);u.forEach.call(a,b,c)}:function(a,b,c){var d=a.length,f=k(a)?a.split(""):a;for(var e=0;e<d;e++)e in f&&b.call(c,f[e],e,a)},v=u.filter?function(a,b,c){t(a.length!=null);return u.filter.call(a,
-b,c)}:function(a,b,c){var d=a.length,f=[],e=0,g=k(a)?a.split(""):a;for(var h=0;h<d;h++)if(h in g){var G=g[h];if(b.call(c,G,h,a))f[e++]=G}return f},w=u.map?function(a,b,c){t(a.length!=null);return u.map.call(a,b,c)}:function(a,b,c){var d=a.length,f=Array(d),e=k(a)?a.split(""):a;for(var g=0;g<d;g++)if(g in e)f[g]=b.call(c,e[g],g,a);return f},oa=u.some?function(a,b,c){t(a.length!=null);return u.some.call(a,b,c)}:function(a,b,c){var d=a.length,f=k(a)?a.split(""):a;for(var e=0;e<d;e++)if(e in f&&b.call(c,
-f[e],e,a))return true;return false};function x(a,b,c){a:{var d=a.length,f=k(a)?a.split(""):a;for(var e=0;e<d;e++)if(e in f&&b.call(c,f[e],e,a)){b=e;break a}b=-1}return b<0?null:k(a)?a.charAt(b):a[b]};var A=true,pa,qa="",B;if(A)B=/WebKit\/(\S+)/;if(B){var ra=B.exec(i.navigator?i.navigator.userAgent:null);qa=ra?ra[1]:""}pa=qa;var sa={};var ta;function C(a,b){this.width=a;this.height=b}C.prototype.toString=function(){return"("+this.width+" x "+this.height+")"};function D(a){return a?new E(F(a)):ta||(ta=new E)}function H(a,b){if(a.contains&&b.nodeType==1)return a==b||a.contains(b);if(typeof a.compareDocumentPosition!="undefined")return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a}function F(a){return a.nodeType==9?a:a.ownerDocument||a.document}function ua(a,b){var c=[];return va(a,b,c,true)?c[0]:undefined}
-function va(a,b,c,d){if(a!=null){var f=0;for(var e;e=a.childNodes[f];f++){if(b(e)){c.push(e);if(d)return true}if(va(e,b,c,d))return true}}return false}function wa(a,b,c,d){if(!c)a=a.parentNode;c=d==null;for(var f=0;a&&(c||f<=d);){if(b(a))return a;a=a.parentNode;f++}return null}function E(a){this.g=a||i.document||document}
-function I(a,b,c,d){a=d||a.g;b=b&&b!="*"?b.toUpperCase():"";if(d=a.querySelectorAll){if(d=a.querySelector){if(!(d=!A)){if(!(d=document.compatMode=="CSS1Compat")){if(!(d=sa["528"])){d=0;var f=q(String(pa)).split("."),e=q(String("528")).split("."),g=Math.max(f.length,e.length);for(var h=0;d==0&&h<g;h++){var G=f[h]||"",Oa=e[h]||"",Pa=RegExp("(\\d*)(\\D*)","g"),Qa=RegExp("(\\d*)(\\D*)","g");do{var y=Pa.exec(G)||["","",""],z=Qa.exec(Oa)||["","",""];if(y[0].length==0&&z[0].length==0)break;d=r(y[1].length==
-0?0:parseInt(y[1],10),z[1].length==0?0:parseInt(z[1],10))||r(y[2].length==0,z[2].length==0)||r(y[2],z[2])}while(d==0)}d=sa["528"]=d>=0}d=d}d=d}d=d}d=d}if(d&&(b||c))c=a.querySelectorAll(b+(c?"."+c:""));else if(c&&a.getElementsByClassName){a=a.getElementsByClassName(c);if(b){d={};e=f=0;for(;g=a[e];e++)if(b==g.nodeName)d[f++]=g;d.length=f;c=d}else c=a}else{a=a.getElementsByTagName(b||"*");if(c){d={};f=0;for(e=0;g=a[e];e++){b=g.className;if(typeof b.split=="function"&&ma(b.split(/\s+/),c)>=0)d[f++]=g}d.length=
-f;c=d}else c=a}return c}E.prototype.contains=H;function xa(){}
-function J(a,b,c){switch(typeof b){case "string":ya(a,b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==null){c.push("null");break}if(j(b)=="array"){var d=b.length;c.push("[");var f="";for(var e=0;e<d;e++){c.push(f);J(a,b[e],c);f=","}c.push("]");break}c.push("{");d="";for(f in b)if(Object.prototype.hasOwnProperty.call(b,f)){e=b[f];if(typeof e!="function"){c.push(d);ya(a,f,c);c.push(":");J(a,
-e,c);d=","}}c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var K={'"':'\\"',"\\":"\\\\","/":"\\/","\u0008":"\\b","\u000c":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\u000b":"\\u000b"},za=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g;
-function ya(a,b,c){c.push('"',b.replace(za,function(d){if(d in K)return K[d];var f=d.charCodeAt(0),e="\\u";if(f<16)e+="000";else if(f<256)e+="00";else if(f<4096)e+="0";return K[d]=e+f.toString(16)}),'"')};function L(a){switch(j(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return w(a,L);case "object":a=a;if("nodeType"in a&&(a.nodeType==1||a.nodeType==9)){var b={};b.ELEMENT=Aa(a);return b}if(aa(a))return w(a,L);a=da(a,function(c,d){return typeof d=="number"||k(d)});return ea(a,L);default:return null}}
-function M(a,b){if(j(a)=="array")return w(a,function(c){return M(c,b)});else if(ba(a))return"ELEMENT"in a?Ba(a.ELEMENT,b):ea(a,function(c){return M(c,b)});return a}function Ca(a){a=a||document;var b=a.$wdc_;if(!b){b=a.$wdc_={};b.m=ca()}return b}function Aa(a){var b=Ca(a.ownerDocument),c=fa(b,function(d){return d==a});if(!c){c=":wdc:"+b.m++;b[c]=a}return c}
-function Ba(a,b){a=decodeURIComponent(a);var c=b||document,d=Ca(c);if(!(a in d))throw new o(10,"Element does not exist in cache");var f=d[a];for(var e=f;e;){if(e==c.documentElement)return f;e=e.parentNode}delete d[a];throw new o(10,"Element is no longer attached to the DOM");};var Da=window;function Ea(){var a=i.Components;if(!a)return false;try{a.o["@mozilla.org/uuid-generator;1"].p(a.l.s);return true}catch(b){return false}};var N={};N.b=function(a,b){if(!a)throw Error("No class name specified");a=q(a);if(a.split(/\s+/).length>1)throw Error("Compound class names not permitted");var c=I(D(b),"*",a,b);return c.length?c[0]:null};N.e=function(a,b){if(!a)throw Error("No class name specified");a=q(a);if(a.split(/\s+/).length>1)throw Error("Compound class names not permitted");return I(D(b),"*",a,b)};var O={};O.b=function(a,b){if(!l(b.querySelector)&&0)throw Error("CSS selection is not supported");if(!a)throw Error("No selector specified");if(a.split(/,/).length>1)throw Error("Compound selectors not permitted");a=q(a);var c=b.querySelector(a);return c&&c.nodeType==1?c:null};O.e=function(a,b){if(!l(b.querySelectorAll)&&0)throw Error("CSS selection is not supported");if(!a)throw Error("No selector specified");if(a.split(/,/).length>1)throw Error("Compound selectors not permitted");a=q(a);return b.querySelectorAll(a)};function Fa(a,b){if(typeof a.selectNodes!="undefined"){var c=F(a);typeof c.setProperty!="undefined"&&c.setProperty("SelectionLanguage","XPath");return a.selectNodes(b)}else if(document.implementation.hasFeature("XPath","3.0")){c=F(a);var d=c.createNSResolver(c.documentElement);c=c.evaluate(b,a,d,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);d=[];var f=c.snapshotLength;for(var e=0;e<f;e++)d.push(c.snapshotItem(e));return d}else return[]};var P={};
-P.b=function(a,b){var c=function(d,f){var e=F(d);if(d.selectSingleNode){e.setProperty&&e.setProperty("SelectionLanguage","XPath");return d.selectSingleNode(f)}else if(e.implementation.hasFeature("XPath","3.0")){var g=e.createNSResolver(e.documentElement),h;if(typeof XPathResult!="undefined")h=XPathResult.FIRST_ORDERED_NODE_TYPE;else{if(!Ea())throw Error("Document claims it supports XPath yet XPathResult is not defined. Please report this to Selenium developers");h=Components.l.r.FIRST_ORDERED_NODE_TYPE}return e.evaluate(f,d,
-g,h,null).singleNodeValue}return null}(b,a);if(!c)return null;if(c.nodeType!=1)throw Error("Returned node is not an element: "+a);return c};P.e=function(a,b){var c=Fa(b,a);na(c,function(d){if(d.nodeType!=1)throw Error("Returned nodes must be elements: "+a);});return c};var Ga="StopIteration"in i?i.StopIteration:Error("StopIteration");function Ha(){}Ha.prototype.next=function(){throw Ga;};function Q(a,b,c,d,f){this.a=!!b;a&&R(this,a,d);this.f=f!=undefined?f:this.d||0;if(this.a)this.f*=-1;this.k=!c}m(Q,Ha);Q.prototype.c=null;Q.prototype.d=0;Q.prototype.j=false;function R(a,b,c,d){if(a.c=b)a.d=typeof c=="number"?c:a.c.nodeType!=1?0:a.a?-1:1;if(typeof d=="number")a.f=d}
-Q.prototype.next=function(){var a;if(this.j){if(!this.c||this.k&&this.f==0)throw Ga;a=this.c;var b=this.a?-1:1;if(this.d==b){var c=this.a?a.lastChild:a.firstChild;c?R(this,c):R(this,a,b*-1)}else(c=this.a?a.previousSibling:a.nextSibling)?R(this,c):R(this,a.parentNode,b*-1);this.f+=this.d*(this.a?-1:1)}else this.j=true;a=this.c;if(!this.c)throw Ga;return a};
-Q.prototype.splice=function(){var a=this.c,b=this.a?1:-1;if(this.d==b){this.d=b*-1;this.f+=this.d*(this.a?-1:1)}this.a=!this.a;Q.prototype.next.call(this);this.a=!this.a;b=aa(arguments[0])?arguments[0]:arguments;for(var c=b.length-1;c>=0;c--)a.parentNode&&a.parentNode.insertBefore(b[c],a.nextSibling);a&&a.parentNode&&a.parentNode.removeChild(a)};function Ia(a,b,c,d){Q.call(this,a,b,c,null,d)}m(Ia,Q);Ia.prototype.next=function(){do Ia.n.next.call(this);while(this.d==-1);return this.c};function Ja(a,b){var c=F(a);if(c.defaultView&&c.defaultView.getComputedStyle)if(c=c.defaultView.getComputedStyle(a,null))return c[b]||c.getPropertyValue(b);return""};function S(a,b){return!!a&&a.nodeType==1&&(!b||a.tagName.toUpperCase()==b)}
-var Ka=["async","autofocus","autoplay","checked","compact","complete","controls","declare","defaultchecked","defaultselected","defer","disabled","draggable","ended","formnovalidate","hidden","indeterminate","iscontenteditable","ismap","itemscope","loop","multiple","muted","nohref","noresize","noshade","novalidate","nowrap","open","paused","pubdate","readonly","required","reversed","scoped","seamless","seeking","selected","spellcheck","truespeed","willvalidate"];
-function T(a,b){if(8==a.nodeType)return null;b=b.toLowerCase();if(b=="style"){var c=q(a.style.cssText).toLowerCase();return c.charAt(c.length-1)==";"?c:c+";"}c=a.getAttributeNode(b);if(!c)return null;if(ma(Ka,b)>=0)return"true";return c.specified?c.value:null}function U(a){for(a=a.parentNode;a&&a.nodeType!=1&&a.nodeType!=9&&a.nodeType!=11;)a=a.parentNode;return S(a)?a:null}function V(a,b){b=la(String(b));return Ja(a,b)||La(a,b)}
-function La(a,b){var c=(a.currentStyle||a.style)[b];if(c!="inherit")return c!==undefined?c:null;return(c=U(a))?La(c,b):null}
-function Ma(a){if(l(a.getBBox))return a.getBBox();var b;if((Ja(a,"display")||(a.currentStyle?a.currentStyle.display:null)||a.style.display)!="none")b=new C(a.offsetWidth,a.offsetHeight);else{b=a.style;var c=b.display,d=b.visibility,f=b.position;b.visibility="hidden";b.position="absolute";b.display="inline";var e;e=a.offsetWidth;a=a.offsetHeight;b.display=c;b.position=f;b.visibility=d;b=new C(e,a)}return b}
-function W(a,b){function c(e){if(V(e,"display")=="none")return false;e=U(e);return!e||c(e)}function d(e){var g=Ma(e);if(g.height>0&&g.width>0)return true;if(e.innerText||e.textContent)if(Na.test(e.innerText||e.textContent))return true;return A&&oa(e.childNodes,function(h){return S(h)&&d(h)})}if(!S(a))throw Error("Argument to isShown must be of type Element");if(S(a,"TITLE"))return(F(a)?F(a).parentWindow||F(a).defaultView:window)==Da;if(S(a,"OPTION")||S(a,"OPTGROUP")){var f=wa(a,function(e){return S(e,
-"SELECT")});return!!f&&W(f)}if(S(a,"MAP")){if(!a.name)return false;f=F(a);f=f.evaluate?P.b('/descendant::*[@usemap = "#'+a.name+'"]',f):ua(f,function(e){return S(e)&&T(e,"usemap")=="#"+a.name});return!!f&&W(f)}if(S(a,"AREA")){f=wa(a,function(e){return S(e,"MAP")});return!!f&&W(f)}if(S(a,"INPUT")&&a.type.toLowerCase()=="hidden")return false;if(V(a,"visibility")=="hidden")return false;if(!c(a))return false;if(!b&&Ra(a)==0)return false;if(!d(a))return false;return true}
-function Sa(a){var b=[];Ta(a,b);b=w(b,q);return q(b.join("\n"))}function Ta(a,b){if(S(a,"BR"))b.push("");else{var c=Ua(a);c&&b[b.length-1]&&b.push("");na(a.childNodes,function(d){if(d.nodeType==3){var f=U(d);if(f){W(f);if(f&&W(f)){d=d.nodeValue.replace(Va," ");f=b.pop()||"";var e=f.length-1;if(e>=0&&f.indexOf(" ",e)==e&&d.lastIndexOf(" ",0)==0)d=d.substr(1);b.push(f+d)}}}else S(d)&&Ta(d,b)});c&&b[b.length-1]&&b.push("")}}function Ua(a){a=V(a,"display");return a=="block"||a=="list-item"}
-var Wa="[\\s\\xa0"+String.fromCharCode(160)+"]+",Va=RegExp(Wa,"g"),Na=RegExp("^"+Wa+"$");function Ra(a){var b=1,c=V(a,"opacity");if(c)b=Number(c);if(a=U(a))b*=Ra(a);return b};var Xa={};Xa.b=function(a,b){var c=D(b),d=k(a)?c.g.getElementById(a):a;if(!d)return null;if(T(d,"id")==a&&H(b,d))return d;c=I(c,"*");return x(c,function(f){return T(f,"id")==a&&H(b,f)})};Xa.e=function(a,b){var c=I(D(b),"*",null,b);return v(c,function(d){return T(d,"id")==a})};var X={},Ya={};X.i=function(a,b,c){b=I(D(b),"A",null,b);return x(b,function(d){d=Sa(d);return c&&d.indexOf(a)!=-1||d==a})};X.h=function(a,b,c){b=I(D(b),"A",null,b);return v(b,function(d){d=Sa(d);return c&&d.indexOf(a)!=-1||d==a})};X.b=function(a,b){return X.i(a,b,false)};X.e=function(a,b){return X.h(a,b,false)};Ya.b=function(a,b){return X.i(a,b,true)};Ya.e=function(a,b){return X.h(a,b,true)};var Za={};Za.b=function(a,b){var c=I(D(b),"*",null,b);return x(c,function(d){return T(d,"name")==a})};Za.e=function(a,b){var c=I(D(b),"*",null,b);return v(c,function(d){return T(d,"name")==a})};var $a={};$a.b=function(a,b){return I(D(b),a,null,b)[0]||null};$a.e=function(a,b){return I(D(b),a,null,b)};var ab={className:N,css:O,id:Xa,linkText:X,name:Za,partialLinkText:Ya,tagName:$a,xpath:P};function bb(a,b){var c;a:{for(c in a)if(!Object.prototype[c]){c=c;break a}c=null}if(c){var d=ab[c];if(d&&l(d.b))return d.b(a[c],b||F(Da))}throw Error("Unsupported locator strategy: "+c);};function cb(a,b,c){var d={};d[a]=b;a=bb;c=[d,c];var f;try{if(k(a))a=new Function(a);var e=M(c),g=a.apply(null,e);f={status:0,value:L(g)}}catch(h){f={status:"code"in h?h.code:13,value:{message:h.message}}}e=[];J(new xa,f,e);return e.join("")}var Y="_".split("."),Z=i;!(Y[0]in Z)&&Z.execScript&&Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());)if(!Y.length&&cb!==undefined)Z[$]=cb;else Z=Z[$]?Z[$]:Z[$]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!='undefined'?window.navigator:null}, arguments);}
diff --git a/core/res/res/raw/find_elements_android.js b/core/res/res/raw/find_elements_android.js
deleted file mode 100644
index 3a57689..0000000
--- a/core/res/res/raw/find_elements_android.js
+++ /dev/null
@@ -1,27 +0,0 @@
-function(){return function(){var i=this;
-function j(a){var b=typeof a;if(b=="object")if(a){if(a instanceof Array)return"array";else if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if(c=="[object Window]")return"object";if(c=="[object Array]"||typeof a.length=="number"&&typeof a.splice!="undefined"&&typeof a.propertyIsEnumerable!="undefined"&&!a.propertyIsEnumerable("splice"))return"array";if(c=="[object Function]"||typeof a.call!="undefined"&&typeof a.propertyIsEnumerable!="undefined"&&!a.propertyIsEnumerable("call"))return"function"}else return"null";else if(b==
-"function"&&typeof a.call=="undefined")return"object";return b}function aa(a){var b=j(a);return b=="array"||b=="object"&&typeof a.length=="number"}function k(a){return typeof a=="string"}function l(a){return j(a)=="function"}function ba(a){a=j(a);return a=="object"||a=="array"||a=="function"}var ca=Date.now||function(){return+new Date};function m(a,b){function c(){}c.prototype=b.prototype;a.n=b.prototype;a.prototype=new c};function n(a){this.stack=Error().stack||"";if(a)this.message=String(a)}m(n,Error);n.prototype.name="CustomError";function da(a,b,c){var d={};for(var f in a)if(b.call(c,a[f],f,a))d[f]=a[f];return d}function ea(a,b,c){var d={};for(var f in a)d[f]=b.call(c,a[f],f,a);return d}function fa(a,b,c){for(var d in a)if(b.call(c,a[d],d,a))return d};function o(a,b){n.call(this,b);this.code=a;this.name=p[a]||p[13]}m(o,n);var p,ga={NoSuchElementError:7,NoSuchFrameError:8,UnknownCommandError:9,StaleElementReferenceError:10,ElementNotVisibleError:11,InvalidElementStateError:12,UnknownError:13,ElementNotSelectableError:15,XPathLookupError:19,NoSuchWindowError:23,InvalidCookieDomainError:24,UnableToSetCookieError:25,ModalDialogOpenedError:26,ModalDialogOpenError:27,ScriptTimeoutError:28},ha={};for(var ia in ga)ha[ga[ia]]=ia;p=ha;
-o.prototype.toString=function(){return"["+this.name+"] "+this.message};function ja(a){for(var b=1;b<arguments.length;b++){var c=String(arguments[b]).replace(/\$/g,"$$$$");a=a.replace(/\%s/,c)}return a}function q(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")}function r(a,b){if(a<b)return-1;else if(a>b)return 1;return 0}var ka={};function la(a){return ka[a]||(ka[a]=String(a).replace(/\-([a-z])/g,function(b,c){return c.toUpperCase()}))};function s(a,b){b.unshift(a);n.call(this,ja.apply(null,b));b.shift();this.q=a}m(s,n);s.prototype.name="AssertionError";function t(a,b){if(!a){var c=Array.prototype.slice.call(arguments,2),d="Assertion failed";if(b){d+=": "+b;var f=c}throw new s(""+d,f||[]);}return a};var u=Array.prototype,ma=u.indexOf?function(a,b,c){t(a.length!=null);return u.indexOf.call(a,b,c)}:function(a,b,c){c=c==null?0:c<0?Math.max(0,a.length+c):c;if(k(a)){if(!k(b)||b.length!=1)return-1;return a.indexOf(b,c)}for(c=c;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1},na=u.forEach?function(a,b,c){t(a.length!=null);u.forEach.call(a,b,c)}:function(a,b,c){var d=a.length,f=k(a)?a.split(""):a;for(var e=0;e<d;e++)e in f&&b.call(c,f[e],e,a)},v=u.filter?function(a,b,c){t(a.length!=null);return u.filter.call(a,
-b,c)}:function(a,b,c){var d=a.length,f=[],e=0,g=k(a)?a.split(""):a;for(var h=0;h<d;h++)if(h in g){var G=g[h];if(b.call(c,G,h,a))f[e++]=G}return f},w=u.map?function(a,b,c){t(a.length!=null);return u.map.call(a,b,c)}:function(a,b,c){var d=a.length,f=Array(d),e=k(a)?a.split(""):a;for(var g=0;g<d;g++)if(g in e)f[g]=b.call(c,e[g],g,a);return f},oa=u.some?function(a,b,c){t(a.length!=null);return u.some.call(a,b,c)}:function(a,b,c){var d=a.length,f=k(a)?a.split(""):a;for(var e=0;e<d;e++)if(e in f&&b.call(c,
-f[e],e,a))return true;return false};function x(a,b,c){a:{var d=a.length,f=k(a)?a.split(""):a;for(var e=0;e<d;e++)if(e in f&&b.call(c,f[e],e,a)){b=e;break a}b=-1}return b<0?null:k(a)?a.charAt(b):a[b]};var A=true,pa,qa="",B;if(A)B=/WebKit\/(\S+)/;if(B){var ra=B.exec(i.navigator?i.navigator.userAgent:null);qa=ra?ra[1]:""}pa=qa;var sa={};var ta;function C(a,b){this.width=a;this.height=b}C.prototype.toString=function(){return"("+this.width+" x "+this.height+")"};function D(a){return a?new E(F(a)):ta||(ta=new E)}function H(a,b){if(a.contains&&b.nodeType==1)return a==b||a.contains(b);if(typeof a.compareDocumentPosition!="undefined")return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a}function F(a){return a.nodeType==9?a:a.ownerDocument||a.document}function ua(a,b){var c=[];return va(a,b,c,true)?c[0]:undefined}
-function va(a,b,c,d){if(a!=null){var f=0;for(var e;e=a.childNodes[f];f++){if(b(e)){c.push(e);if(d)return true}if(va(e,b,c,d))return true}}return false}function wa(a,b,c,d){if(!c)a=a.parentNode;c=d==null;for(var f=0;a&&(c||f<=d);){if(b(a))return a;a=a.parentNode;f++}return null}function E(a){this.g=a||i.document||document}
-function I(a,b,c,d){a=d||a.g;b=b&&b!="*"?b.toUpperCase():"";if(d=a.querySelectorAll){if(d=a.querySelector){if(!(d=!A)){if(!(d=document.compatMode=="CSS1Compat")){if(!(d=sa["528"])){d=0;var f=q(String(pa)).split("."),e=q(String("528")).split("."),g=Math.max(f.length,e.length);for(var h=0;d==0&&h<g;h++){var G=f[h]||"",Oa=e[h]||"",Pa=RegExp("(\\d*)(\\D*)","g"),Qa=RegExp("(\\d*)(\\D*)","g");do{var y=Pa.exec(G)||["","",""],z=Qa.exec(Oa)||["","",""];if(y[0].length==0&&z[0].length==0)break;d=r(y[1].length==
-0?0:parseInt(y[1],10),z[1].length==0?0:parseInt(z[1],10))||r(y[2].length==0,z[2].length==0)||r(y[2],z[2])}while(d==0)}d=sa["528"]=d>=0}d=d}d=d}d=d}d=d}if(d&&(b||c))c=a.querySelectorAll(b+(c?"."+c:""));else if(c&&a.getElementsByClassName){a=a.getElementsByClassName(c);if(b){d={};e=f=0;for(;g=a[e];e++)if(b==g.nodeName)d[f++]=g;d.length=f;c=d}else c=a}else{a=a.getElementsByTagName(b||"*");if(c){d={};f=0;for(e=0;g=a[e];e++){b=g.className;if(typeof b.split=="function"&&ma(b.split(/\s+/),c)>=0)d[f++]=g}d.length=
-f;c=d}else c=a}return c}E.prototype.contains=H;function xa(){}
-function J(a,b,c){switch(typeof b){case "string":ya(a,b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==null){c.push("null");break}if(j(b)=="array"){var d=b.length;c.push("[");var f="";for(var e=0;e<d;e++){c.push(f);J(a,b[e],c);f=","}c.push("]");break}c.push("{");d="";for(f in b)if(Object.prototype.hasOwnProperty.call(b,f)){e=b[f];if(typeof e!="function"){c.push(d);ya(a,f,c);c.push(":");J(a,
-e,c);d=","}}c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var K={'"':'\\"',"\\":"\\\\","/":"\\/","\u0008":"\\b","\u000c":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\u000b":"\\u000b"},za=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g;
-function ya(a,b,c){c.push('"',b.replace(za,function(d){if(d in K)return K[d];var f=d.charCodeAt(0),e="\\u";if(f<16)e+="000";else if(f<256)e+="00";else if(f<4096)e+="0";return K[d]=e+f.toString(16)}),'"')};function L(a){switch(j(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return w(a,L);case "object":a=a;if("nodeType"in a&&(a.nodeType==1||a.nodeType==9)){var b={};b.ELEMENT=Aa(a);return b}if(aa(a))return w(a,L);a=da(a,function(c,d){return typeof d=="number"||k(d)});return ea(a,L);default:return null}}
-function M(a,b){if(j(a)=="array")return w(a,function(c){return M(c,b)});else if(ba(a))return"ELEMENT"in a?Ba(a.ELEMENT,b):ea(a,function(c){return M(c,b)});return a}function Ca(a){a=a||document;var b=a.$wdc_;if(!b){b=a.$wdc_={};b.m=ca()}return b}function Aa(a){var b=Ca(a.ownerDocument),c=fa(b,function(d){return d==a});if(!c){c=":wdc:"+b.m++;b[c]=a}return c}
-function Ba(a,b){a=decodeURIComponent(a);var c=b||document,d=Ca(c);if(!(a in d))throw new o(10,"Element does not exist in cache");var f=d[a];for(var e=f;e;){if(e==c.documentElement)return f;e=e.parentNode}delete d[a];throw new o(10,"Element is no longer attached to the DOM");};var Da=window;function Ea(){var a=i.Components;if(!a)return false;try{a.o["@mozilla.org/uuid-generator;1"].p(a.l.s);return true}catch(b){return false}};var N={};N.d=function(a,b){if(!a)throw Error("No class name specified");a=q(a);if(a.split(/\s+/).length>1)throw Error("Compound class names not permitted");var c=I(D(b),"*",a,b);return c.length?c[0]:null};N.b=function(a,b){if(!a)throw Error("No class name specified");a=q(a);if(a.split(/\s+/).length>1)throw Error("Compound class names not permitted");return I(D(b),"*",a,b)};var O={};O.d=function(a,b){if(!l(b.querySelector)&&0)throw Error("CSS selection is not supported");if(!a)throw Error("No selector specified");if(a.split(/,/).length>1)throw Error("Compound selectors not permitted");a=q(a);var c=b.querySelector(a);return c&&c.nodeType==1?c:null};O.b=function(a,b){if(!l(b.querySelectorAll)&&0)throw Error("CSS selection is not supported");if(!a)throw Error("No selector specified");if(a.split(/,/).length>1)throw Error("Compound selectors not permitted");a=q(a);return b.querySelectorAll(a)};function Fa(a,b){if(typeof a.selectNodes!="undefined"){var c=F(a);typeof c.setProperty!="undefined"&&c.setProperty("SelectionLanguage","XPath");return a.selectNodes(b)}else if(document.implementation.hasFeature("XPath","3.0")){c=F(a);var d=c.createNSResolver(c.documentElement);c=c.evaluate(b,a,d,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);d=[];var f=c.snapshotLength;for(var e=0;e<f;e++)d.push(c.snapshotItem(e));return d}else return[]};var P={};
-P.d=function(a,b){var c=function(d,f){var e=F(d);if(d.selectSingleNode){e.setProperty&&e.setProperty("SelectionLanguage","XPath");return d.selectSingleNode(f)}else if(e.implementation.hasFeature("XPath","3.0")){var g=e.createNSResolver(e.documentElement),h;if(typeof XPathResult!="undefined")h=XPathResult.FIRST_ORDERED_NODE_TYPE;else{if(!Ea())throw Error("Document claims it supports XPath yet XPathResult is not defined. Please report this to Selenium developers");h=Components.l.r.FIRST_ORDERED_NODE_TYPE}return e.evaluate(f,d,
-g,h,null).singleNodeValue}return null}(b,a);if(!c)return null;if(c.nodeType!=1)throw Error("Returned node is not an element: "+a);return c};P.b=function(a,b){var c=Fa(b,a);na(c,function(d){if(d.nodeType!=1)throw Error("Returned nodes must be elements: "+a);});return c};var Ga="StopIteration"in i?i.StopIteration:Error("StopIteration");function Ha(){}Ha.prototype.next=function(){throw Ga;};function Q(a,b,c,d,f){this.a=!!b;a&&R(this,a,d);this.f=f!=undefined?f:this.e||0;if(this.a)this.f*=-1;this.k=!c}m(Q,Ha);Q.prototype.c=null;Q.prototype.e=0;Q.prototype.j=false;function R(a,b,c,d){if(a.c=b)a.e=typeof c=="number"?c:a.c.nodeType!=1?0:a.a?-1:1;if(typeof d=="number")a.f=d}
-Q.prototype.next=function(){var a;if(this.j){if(!this.c||this.k&&this.f==0)throw Ga;a=this.c;var b=this.a?-1:1;if(this.e==b){var c=this.a?a.lastChild:a.firstChild;c?R(this,c):R(this,a,b*-1)}else(c=this.a?a.previousSibling:a.nextSibling)?R(this,c):R(this,a.parentNode,b*-1);this.f+=this.e*(this.a?-1:1)}else this.j=true;a=this.c;if(!this.c)throw Ga;return a};
-Q.prototype.splice=function(){var a=this.c,b=this.a?1:-1;if(this.e==b){this.e=b*-1;this.f+=this.e*(this.a?-1:1)}this.a=!this.a;Q.prototype.next.call(this);this.a=!this.a;b=aa(arguments[0])?arguments[0]:arguments;for(var c=b.length-1;c>=0;c--)a.parentNode&&a.parentNode.insertBefore(b[c],a.nextSibling);a&&a.parentNode&&a.parentNode.removeChild(a)};function Ia(a,b,c,d){Q.call(this,a,b,c,null,d)}m(Ia,Q);Ia.prototype.next=function(){do Ia.n.next.call(this);while(this.e==-1);return this.c};function Ja(a,b){var c=F(a);if(c.defaultView&&c.defaultView.getComputedStyle)if(c=c.defaultView.getComputedStyle(a,null))return c[b]||c.getPropertyValue(b);return""};function S(a,b){return!!a&&a.nodeType==1&&(!b||a.tagName.toUpperCase()==b)}
-var Ka=["async","autofocus","autoplay","checked","compact","complete","controls","declare","defaultchecked","defaultselected","defer","disabled","draggable","ended","formnovalidate","hidden","indeterminate","iscontenteditable","ismap","itemscope","loop","multiple","muted","nohref","noresize","noshade","novalidate","nowrap","open","paused","pubdate","readonly","required","reversed","scoped","seamless","seeking","selected","spellcheck","truespeed","willvalidate"];
-function T(a,b){if(8==a.nodeType)return null;b=b.toLowerCase();if(b=="style"){var c=q(a.style.cssText).toLowerCase();return c.charAt(c.length-1)==";"?c:c+";"}c=a.getAttributeNode(b);if(!c)return null;if(ma(Ka,b)>=0)return"true";return c.specified?c.value:null}function U(a){for(a=a.parentNode;a&&a.nodeType!=1&&a.nodeType!=9&&a.nodeType!=11;)a=a.parentNode;return S(a)?a:null}function V(a,b){b=la(String(b));return Ja(a,b)||La(a,b)}
-function La(a,b){var c=(a.currentStyle||a.style)[b];if(c!="inherit")return c!==undefined?c:null;return(c=U(a))?La(c,b):null}
-function Ma(a){if(l(a.getBBox))return a.getBBox();var b;if((Ja(a,"display")||(a.currentStyle?a.currentStyle.display:null)||a.style.display)!="none")b=new C(a.offsetWidth,a.offsetHeight);else{b=a.style;var c=b.display,d=b.visibility,f=b.position;b.visibility="hidden";b.position="absolute";b.display="inline";var e;e=a.offsetWidth;a=a.offsetHeight;b.display=c;b.position=f;b.visibility=d;b=new C(e,a)}return b}
-function W(a,b){function c(e){if(V(e,"display")=="none")return false;e=U(e);return!e||c(e)}function d(e){var g=Ma(e);if(g.height>0&&g.width>0)return true;if(e.innerText||e.textContent)if(Na.test(e.innerText||e.textContent))return true;return A&&oa(e.childNodes,function(h){return S(h)&&d(h)})}if(!S(a))throw Error("Argument to isShown must be of type Element");if(S(a,"TITLE"))return(F(a)?F(a).parentWindow||F(a).defaultView:window)==Da;if(S(a,"OPTION")||S(a,"OPTGROUP")){var f=wa(a,function(e){return S(e,
-"SELECT")});return!!f&&W(f)}if(S(a,"MAP")){if(!a.name)return false;f=F(a);f=f.evaluate?P.d('/descendant::*[@usemap = "#'+a.name+'"]',f):ua(f,function(e){return S(e)&&T(e,"usemap")=="#"+a.name});return!!f&&W(f)}if(S(a,"AREA")){f=wa(a,function(e){return S(e,"MAP")});return!!f&&W(f)}if(S(a,"INPUT")&&a.type.toLowerCase()=="hidden")return false;if(V(a,"visibility")=="hidden")return false;if(!c(a))return false;if(!b&&Ra(a)==0)return false;if(!d(a))return false;return true}
-function Sa(a){var b=[];Ta(a,b);b=w(b,q);return q(b.join("\n"))}function Ta(a,b){if(S(a,"BR"))b.push("");else{var c=Ua(a);c&&b[b.length-1]&&b.push("");na(a.childNodes,function(d){if(d.nodeType==3){var f=U(d);if(f){W(f);if(f&&W(f)){d=d.nodeValue.replace(Va," ");f=b.pop()||"";var e=f.length-1;if(e>=0&&f.indexOf(" ",e)==e&&d.lastIndexOf(" ",0)==0)d=d.substr(1);b.push(f+d)}}}else S(d)&&Ta(d,b)});c&&b[b.length-1]&&b.push("")}}function Ua(a){a=V(a,"display");return a=="block"||a=="list-item"}
-var Wa="[\\s\\xa0"+String.fromCharCode(160)+"]+",Va=RegExp(Wa,"g"),Na=RegExp("^"+Wa+"$");function Ra(a){var b=1,c=V(a,"opacity");if(c)b=Number(c);if(a=U(a))b*=Ra(a);return b};var Xa={};Xa.d=function(a,b){var c=D(b),d=k(a)?c.g.getElementById(a):a;if(!d)return null;if(T(d,"id")==a&&H(b,d))return d;c=I(c,"*");return x(c,function(f){return T(f,"id")==a&&H(b,f)})};Xa.b=function(a,b){var c=I(D(b),"*",null,b);return v(c,function(d){return T(d,"id")==a})};var X={},Ya={};X.i=function(a,b,c){b=I(D(b),"A",null,b);return x(b,function(d){d=Sa(d);return c&&d.indexOf(a)!=-1||d==a})};X.h=function(a,b,c){b=I(D(b),"A",null,b);return v(b,function(d){d=Sa(d);return c&&d.indexOf(a)!=-1||d==a})};X.d=function(a,b){return X.i(a,b,false)};X.b=function(a,b){return X.h(a,b,false)};Ya.d=function(a,b){return X.i(a,b,true)};Ya.b=function(a,b){return X.h(a,b,true)};var Za={};Za.d=function(a,b){var c=I(D(b),"*",null,b);return x(c,function(d){return T(d,"name")==a})};Za.b=function(a,b){var c=I(D(b),"*",null,b);return v(c,function(d){return T(d,"name")==a})};var $a={};$a.d=function(a,b){return I(D(b),a,null,b)[0]||null};$a.b=function(a,b){return I(D(b),a,null,b)};var ab={className:N,css:O,id:Xa,linkText:X,name:Za,partialLinkText:Ya,tagName:$a,xpath:P};function bb(a,b){var c;a:{for(c in a)if(!Object.prototype[c]){c=c;break a}c=null}if(c){var d=ab[c];if(d&&l(d.b))return d.b(a[c],b||F(Da))}throw Error("Unsupported locator strategy: "+c);};function cb(a,b,c){var d={};d[a]=b;a=bb;c=[d,c];var f;try{if(k(a))a=new Function(a);var e=M(c),g=a.apply(null,e);f={status:0,value:L(g)}}catch(h){f={status:"code"in h?h.code:13,value:{message:h.message}}}e=[];J(new xa,f,e);return e.join("")}var Y="_".split("."),Z=i;!(Y[0]in Z)&&Z.execScript&&Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());)if(!Y.length&&cb!==undefined)Z[$]=cb;else Z=Z[$]?Z[$]:Z[$]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!='undefined'?window.navigator:null}, arguments);}
diff --git a/core/res/res/raw/get_attribute_value_android.js b/core/res/res/raw/get_attribute_value_android.js
deleted file mode 100644
index dc43fa7..0000000
--- a/core/res/res/raw/get_attribute_value_android.js
+++ /dev/null
@@ -1,26 +0,0 @@
-function(){return function(){var h,n=this;function p(){}
-function q(a){var b=typeof a;if(b=="object")if(a){if(a instanceof Array)return"array";else if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if(c=="[object Window]")return"object";if(c=="[object Array]"||typeof a.length=="number"&&typeof a.splice!="undefined"&&typeof a.propertyIsEnumerable!="undefined"&&!a.propertyIsEnumerable("splice"))return"array";if(c=="[object Function]"||typeof a.call!="undefined"&&typeof a.propertyIsEnumerable!="undefined"&&!a.propertyIsEnumerable("call"))return"function"}else return"null";
-else if(b=="function"&&typeof a.call=="undefined")return"object";return b}function aa(a){var b=q(a);return b=="array"||b=="object"&&typeof a.length=="number"}function r(a){return typeof a=="string"}function s(a){a=q(a);return a=="object"||a=="array"||a=="function"}function u(a){return a[ba]||(a[ba]=++ca)}var ba="closure_uid_"+Math.floor(Math.random()*2147483648).toString(36),ca=0,da=Date.now||function(){return+new Date};
-function v(a,b){function c(){}c.prototype=b.prototype;a.q=b.prototype;a.prototype=new c};function w(a){this.stack=Error().stack||"";if(a)this.message=String(a)}v(w,Error);w.prototype.name="CustomError";function ea(a,b,c){var d={};for(var e in a)if(b.call(c,a[e],e,a))d[e]=a[e];return d}function fa(a,b,c){var d={};for(var e in a)d[e]=b.call(c,a[e],e,a);return d}function ga(a,b,c){for(var d in a)if(b.call(c,a[d],d,a))return d};function x(a,b){w.call(this,b);this.code=a;this.name=y[a]||y[13]}v(x,w);var y,ha={NoSuchElementError:7,NoSuchFrameError:8,UnknownCommandError:9,StaleElementReferenceError:10,ElementNotVisibleError:11,InvalidElementStateError:12,UnknownError:13,ElementNotSelectableError:15,XPathLookupError:19,NoSuchWindowError:23,InvalidCookieDomainError:24,UnableToSetCookieError:25,ModalDialogOpenedError:26,ModalDialogOpenError:27,ScriptTimeoutError:28},ia={};for(var ja in ha)ia[ha[ja]]=ja;y=ia;
-x.prototype.toString=function(){return"["+this.name+"] "+this.message};function ka(a){for(var b=1;b<arguments.length;b++){var c=String(arguments[b]).replace(/\$/g,"$$$$");a=a.replace(/\%s/,c)}return a}function z(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")}
-function la(a,b){var c=0,d=z(String(a)).split("."),e=z(String(b)).split("."),f=Math.max(d.length,e.length);for(var g=0;c==0&&g<f;g++){var i=d[g]||"",l=e[g]||"",j=RegExp("(\\d*)(\\D*)","g"),t=RegExp("(\\d*)(\\D*)","g");do{var m=j.exec(i)||["","",""],k=t.exec(l)||["","",""];if(m[0].length==0&&k[0].length==0)break;c=A(m[1].length==0?0:parseInt(m[1],10),k[1].length==0?0:parseInt(k[1],10))||A(m[2].length==0,k[2].length==0)||A(m[2],k[2])}while(c==0)}return c}
-function A(a,b){if(a<b)return-1;else if(a>b)return 1;return 0};function B(a,b){b.unshift(a);w.call(this,ka.apply(null,b));b.shift();this.J=a}v(B,w);B.prototype.name="AssertionError";function C(a,b){if(!a){var c=Array.prototype.slice.call(arguments,2),d="Assertion failed";if(b){d+=": "+b;var e=c}throw new B(""+d,e||[]);}return a};var D=Array.prototype,E=D.indexOf?function(a,b,c){C(a.length!=null);return D.indexOf.call(a,b,c)}:function(a,b,c){c=c==null?0:c<0?Math.max(0,a.length+c):c;if(r(a)){if(!r(b)||b.length!=1)return-1;return a.indexOf(b,c)}for(c=c;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1},F=D.map?function(a,b,c){C(a.length!=null);return D.map.call(a,b,c)}:function(a,b,c){var d=a.length,e=Array(d),f=r(a)?a.split(""):a;for(var g=0;g<d;g++)if(g in f)e[g]=b.call(c,f[g],g,a);return e};var ma=n.navigator,na=(ma&&ma.platform||"").indexOf("Mac")!=-1,oa="",pa;if(pa=/WebKit\/(\S+)/){var qa=pa.exec(n.navigator?n.navigator.userAgent:null);oa=qa?qa[1]:""};var G="StopIteration"in n?n.StopIteration:Error("StopIteration");function ra(){}ra.prototype.next=function(){throw G;};function H(a,b,c,d,e){this.a=!!b;a&&I(this,a,d);this.h=e!=undefined?e:this.d||0;if(this.a)this.h*=-1;this.C=!c}v(H,ra);h=H.prototype;h.c=null;h.d=0;h.B=false;function I(a,b,c,d){if(a.c=b)a.d=typeof c=="number"?c:a.c.nodeType!=1?0:a.a?-1:1;if(typeof d=="number")a.h=d}
-h.next=function(){var a;if(this.B){if(!this.c||this.C&&this.h==0)throw G;a=this.c;var b=this.a?-1:1;if(this.d==b){var c=this.a?a.lastChild:a.firstChild;c?I(this,c):I(this,a,b*-1)}else(c=this.a?a.previousSibling:a.nextSibling)?I(this,c):I(this,a.parentNode,b*-1);this.h+=this.d*(this.a?-1:1)}else this.B=true;a=this.c;if(!this.c)throw G;return a};
-h.splice=function(){var a=this.c,b=this.a?1:-1;if(this.d==b){this.d=b*-1;this.h+=this.d*(this.a?-1:1)}this.a=!this.a;H.prototype.next.call(this);this.a=!this.a;b=aa(arguments[0])?arguments[0]:arguments;for(var c=b.length-1;c>=0;c--)a.parentNode&&a.parentNode.insertBefore(b[c],a.nextSibling);a&&a.parentNode&&a.parentNode.removeChild(a)};function J(a,b,c,d){H.call(this,a,b,c,null,d)}v(J,H);J.prototype.next=function(){do J.q.next.call(this);while(this.d==-1);return this.c};var sa={"class":"className",readonly:"readOnly"},ta=["checked","disabled","draggable","hidden"],ua=["async","autofocus","autoplay","checked","compact","complete","controls","declare","defaultchecked","defaultselected","defer","disabled","draggable","ended","formnovalidate","hidden","indeterminate","iscontenteditable","ismap","itemscope","loop","multiple","muted","nohref","noresize","noshade","novalidate","nowrap","open","paused","pubdate","readonly","required","reversed","scoped","seamless","seeking",
-"selected","spellcheck","truespeed","willvalidate"];function va(a,b){if(8==a.nodeType)return null;b=b.toLowerCase();if(b=="style"){var c=z(a.style.cssText).toLowerCase();return c.charAt(c.length-1)==";"?c:c+";"}c=a.getAttributeNode(b);if(!c)return null;if(E(ua,b)>=0)return"true";return c.specified?c.value:null}String.fromCharCode(160);var K;var wa=[];function L(){if(xa)M[u(this)]=this}var xa=false,M={};L.prototype.t=false;L.prototype.k=function(){if(!this.t){this.t=true;this.g();if(xa){var a=u(this);if(!M.hasOwnProperty(a))throw Error(this+" did not call the goog.Disposable base constructor or was disposed of after a clearUndisposedObjects call");delete M[a]}}};L.prototype.g=function(){};function N(a,b){L.call(this);this.type=a;this.currentTarget=this.target=b}v(N,L);N.prototype.g=function(){delete this.type;delete this.target;delete this.currentTarget};N.prototype.p=false;N.prototype.G=true;new Function("a","return a");function O(a,b){a&&this.m(a,b)}v(O,N);h=O.prototype;h.target=null;h.relatedTarget=null;h.offsetX=0;h.offsetY=0;h.clientX=0;h.clientY=0;h.screenX=0;h.screenY=0;h.button=0;h.keyCode=0;h.charCode=0;h.ctrlKey=false;h.altKey=false;h.shiftKey=false;h.metaKey=false;h.F=false;h.u=null;
-h.m=function(a,b){var c=this.type=a.type;N.call(this,c);this.target=a.target||a.srcElement;this.currentTarget=b;var d=a.relatedTarget;if(!d)if(c=="mouseover")d=a.fromElement;else if(c=="mouseout")d=a.toElement;this.relatedTarget=d;this.offsetX=a.offsetX!==undefined?a.offsetX:a.layerX;this.offsetY=a.offsetY!==undefined?a.offsetY:a.layerY;this.clientX=a.clientX!==undefined?a.clientX:a.pageX;this.clientY=a.clientY!==undefined?a.clientY:a.pageY;this.screenX=a.screenX||0;this.screenY=a.screenY||0;this.button=
-a.button;this.keyCode=a.keyCode||0;this.charCode=a.charCode||(c=="keypress"?a.keyCode:0);this.ctrlKey=a.ctrlKey;this.altKey=a.altKey;this.shiftKey=a.shiftKey;this.metaKey=a.metaKey;this.F=na?a.metaKey:a.ctrlKey;this.H=a.H;this.u=a;delete this.G;delete this.p};h.g=function(){O.q.g.call(this);this.relatedTarget=this.currentTarget=this.target=this.u=null};function ya(){}var za=0;h=ya.prototype;h.key=0;h.j=false;h.r=false;h.m=function(a,b,c,d,e,f){if(q(a)=="function")this.v=true;else if(a&&a.handleEvent&&q(a.handleEvent)=="function")this.v=false;else throw Error("Invalid listener argument");this.n=a;this.A=b;this.src=c;this.type=d;this.capture=!!e;this.D=f;this.r=false;this.key=++za;this.j=false};h.handleEvent=function(a){if(this.v)return this.n.call(this.D||this.src,a);return this.n.handleEvent.call(this.n,a)};function P(a,b){L.call(this);this.w=b;this.e=[];if(a>this.w)throw Error("[goog.structs.SimplePool] Initial cannot be greater than max");for(var c=0;c<a;c++)this.e.push(this.b?this.b():{})}v(P,L);P.prototype.b=null;P.prototype.s=null;function Aa(a){if(a.e.length)return a.e.pop();return a.b?a.b():{}}function Q(a,b){a.e.length<a.w?a.e.push(b):Ba(a,b)}function Ba(a,b){if(a.s)a.s(b);else if(s(b))if(q(b.k)=="function")b.k();else for(var c in b)delete b[c]}
-P.prototype.g=function(){P.q.g.call(this);for(var a=this.e;a.length;)Ba(this,a.pop());delete this.e};var Ca;var Da=(Ca="ScriptEngine"in n&&n.ScriptEngine()=="JScript")?n.ScriptEngineMajorVersion()+"."+n.ScriptEngineMinorVersion()+"."+n.ScriptEngineBuildVersion():"0";var R,S,T,Ea,Fa,Ga,Ha,Ia;
-(function(){function a(){return{f:0,i:0}}function b(){return[]}function c(){function k(o){return g.call(k.src,k.key,o)}return k}function d(){return new ya}function e(){return new O}var f=Ca&&!(la(Da,"5.7")>=0),g;Ea=function(k){g=k};if(f){R=function(k){Q(i,k)};S=function(){return Aa(l)};T=function(k){Q(l,k)};Fa=function(){Q(j,c())};Ga=function(k){Q(t,k)};Ha=function(){return Aa(m)};Ia=function(k){Q(m,k)};var i=new P(0,600);i.b=a;var l=new P(0,600);l.b=b;var j=new P(0,600);j.b=c;var t=new P(0,600);
-t.b=d;var m=new P(0,600);m.b=e}else{R=p;S=b;Ga=Fa=T=p;Ha=e;Ia=p}})();var U={},V={},Ja={},Ka={};function La(a,b,c,d){if(!d.l)if(d.z){var e=0;for(var f=0;e<d.length;e++)if(d[e].j){var g=d[e].A;g.src=null;Fa(g);Ga(d[e])}else{if(e!=f)d[f]=d[e];f++}d.length=f;d.z=false;if(f==0){T(d);delete V[a][b][c];V[a][b].f--;if(V[a][b].f==0){R(V[a][b]);delete V[a][b];V[a].f--}if(V[a].f==0){R(V[a]);delete V[a]}}}}function Ma(a){if(a in Ka)return Ka[a];return Ka[a]="on"+a}
-function Na(a,b,c,d,e){var f=1;b=u(b);if(a[b]){a.i--;a=a[b];if(a.l)a.l++;else a.l=1;try{var g=a.length;for(var i=0;i<g;i++){var l=a[i];if(l&&!l.j)f&=Oa(l,e)!==false}}finally{a.l--;La(c,d,b,a)}}return Boolean(f)}
-function Oa(a,b){var c=a.handleEvent(b);if(a.r){var d=a.key;if(U[d]){var e=U[d];if(!e.j){var f=e.src,g=e.type,i=e.A,l=e.capture;if(f.removeEventListener){if(f==n||!f.I)f.removeEventListener(g,i,l)}else f.detachEvent&&f.detachEvent(Ma(g),i);f=u(f);i=V[g][l][f];if(Ja[f]){var j=Ja[f],t=E(j,e);if(t>=0){C(j.length!=null);D.splice.call(j,t,1)}j.length==0&&delete Ja[f]}e.j=true;i.z=true;La(g,l,f,i);delete U[d]}}}return c}
-function W(a,b){if(!U[a])return true;var c=U[a],d=c.type,e=V;if(!(d in e))return true;e=e[d];var f,g;if(K===undefined)K=false;if(K){var i;if(!(i=b))a:{i="window.event".split(".");var l=n;for(;f=i.shift();)if(l[f]!=null)l=l[f];else{i=null;break a}i=l}f=i;i=true in e;l=false in e;if(i){if(f.keyCode<0||f.returnValue!=undefined)return true;a:{var j=false;if(f.keyCode==0)try{f.keyCode=-1;break a}catch(t){j=true}if(j||f.returnValue==undefined)f.returnValue=true}}j=Ha();j.m(f,this);f=true;try{if(i){var m=
-S();for(var k=j.currentTarget;k;k=k.parentNode)m.push(k);g=e[true];g.i=g.f;for(var o=m.length-1;!j.p&&o>=0&&g.i;o--){j.currentTarget=m[o];f&=Na(g,m[o],d,true,j)}if(l){g=e[false];g.i=g.f;for(o=0;!j.p&&o<m.length&&g.i;o++){j.currentTarget=m[o];f&=Na(g,m[o],d,false,j)}}}else f=Oa(c,j)}finally{if(m){m.length=0;T(m)}j.k();Ia(j)}return f}d=new O(b,this);try{f=Oa(c,d)}finally{d.k()}return f}Ea(W);wa[wa.length]=function(a){W=a(W);Ea(W)};function Pa(){}
-function Qa(a,b,c){switch(typeof b){case "string":Ra(a,b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==null){c.push("null");break}if(q(b)=="array"){var d=b.length;c.push("[");var e="";for(var f=0;f<d;f++){c.push(e);Qa(a,b[f],c);e=","}c.push("]");break}c.push("{");d="";for(e in b)if(Object.prototype.hasOwnProperty.call(b,e)){f=b[e];if(typeof f!="function"){c.push(d);Ra(a,e,c);c.push(":");
-Qa(a,f,c);d=","}}c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var Sa={'"':'\\"',"\\":"\\\\","/":"\\/","\u0008":"\\b","\u000c":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\u000b":"\\u000b"},Ta=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g;
-function Ra(a,b,c){c.push('"',b.replace(Ta,function(d){if(d in Sa)return Sa[d];var e=d.charCodeAt(0),f="\\u";if(e<16)f+="000";else if(e<256)f+="00";else if(e<4096)f+="0";return Sa[d]=f+e.toString(16)}),'"')};function X(a){switch(q(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return F(a,X);case "object":a=a;if("nodeType"in a&&(a.nodeType==1||a.nodeType==9)){var b={};b.ELEMENT=Ua(a);return b}if(aa(a))return F(a,X);a=ea(a,function(c,d){return typeof d=="number"||r(d)});return fa(a,X);default:return null}}
-function Va(a,b){if(q(a)=="array")return F(a,function(c){return Va(c,b)});else if(s(a))return"ELEMENT"in a?Wa(a.ELEMENT,b):fa(a,function(c){return Va(c,b)});return a}function Xa(a){a=a||document;var b=a.$wdc_;if(!b){b=a.$wdc_={};b.o=da()}if(!b.o)b.o=da();return b}function Ua(a){var b=Xa(a.ownerDocument),c=ga(b,function(d){return d==a});if(!c){c=":wdc:"+b.o++;b[c]=a}return c}
-function Wa(a,b){a=decodeURIComponent(a);var c=b||document,d=Xa(c);if(!(a in d))throw new x(10,"Element does not exist in cache");var e=d[a];for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new x(10,"Element is no longer attached to the DOM");};var Ya=["checkbox","radio"];function Za(a){var b=a.tagName.toUpperCase();if(b=="OPTION")return true;if(b=="INPUT")if(E(Ya,a.type)>=0)return true;return false}
-function $a(a,b){var c=null;c=b.toLowerCase();if("style"==b.toLowerCase()){if((c=a.style)&&!r(c))c=c.cssText;return c}if("selected"==c||"checked"==c&&Za(a)){var d;if(Za(a)){d="selected";var e=a.type&&a.type.toLowerCase();if("checkbox"==e||"radio"==e)d="checked";d=!!a[d]}else d=false;return d?"true":null}var f=a.tagName&&"A"==a.tagName.toUpperCase(),g=a.tagName&&"IMG"==a.tagName.toUpperCase();try{e=sa[b]||b;var i=a[e];d=i===undefined&&E(ta,e)>=0?false:i}catch(l){}c=c=="href"&&f||c=="src"&&g||d==null||
-s(d)?va(a,b):d;return c!=null?c.toString():null};function ab(a,b){var c=$a,d=[a,b],e;try{if(r(c))c=new Function(c);var f=Va(d),g=c.apply(null,f);e={status:0,value:X(g)}}catch(i){e={status:"code"in i?i.code:13,value:{message:i.message}}}c=[];Qa(new Pa,e,c);return c.join("")}var Y="_".split("."),Z=n;!(Y[0]in Z)&&Z.execScript&&Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());)if(!Y.length&&ab!==undefined)Z[$]=ab;else Z=Z[$]?Z[$]:Z[$]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!='undefined'?window.navigator:null}, arguments);}
diff --git a/core/res/res/raw/get_size_android.js b/core/res/res/raw/get_size_android.js
deleted file mode 100644
index 54c2678..0000000
--- a/core/res/res/raw/get_size_android.js
+++ /dev/null
@@ -1,11 +0,0 @@
-function(){return function(){function g(a){var b=typeof a;if(b=="object")if(a){if(a instanceof Array)return"array";else if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if(c=="[object Window]")return"object";if(c=="[object Array]"||typeof a.length=="number"&&typeof a.splice!="undefined"&&typeof a.propertyIsEnumerable!="undefined"&&!a.propertyIsEnumerable("splice"))return"array";if(c=="[object Function]"||typeof a.call!="undefined"&&typeof a.propertyIsEnumerable!="undefined"&&!a.propertyIsEnumerable("call"))return"function"}else return"null";
-else if(b=="function"&&typeof a.call=="undefined")return"object";return b}function h(a){var b=g(a);return b=="array"||b=="object"&&typeof a.length=="number"}function i(a){a=g(a);return a=="object"||a=="array"||a=="function"}Math.floor(Math.random()*2147483648).toString(36);var j=Date.now||function(){return+new Date};function l(a,b){function c(){}c.prototype=b.prototype;a.h=b.prototype;a.prototype=new c};function m(a){this.stack=Error().stack||"";if(a)this.message=String(a)}l(m,Error);m.prototype.name="CustomError";function n(a,b,c){var d={};for(var e in a)if(b.call(c,a[e],e,a))d[e]=a[e];return d}function o(a,b,c){var d={};for(var e in a)d[e]=b.call(c,a[e],e,a);return d}function p(a,b,c){for(var d in a)if(b.call(c,a[d],d,a))return d};function q(a,b){m.call(this,b);this.code=a;this.name=r[a]||r[13]}l(q,m);var r,s={NoSuchElementError:7,NoSuchFrameError:8,UnknownCommandError:9,StaleElementReferenceError:10,ElementNotVisibleError:11,InvalidElementStateError:12,UnknownError:13,ElementNotSelectableError:15,XPathLookupError:19,NoSuchWindowError:23,InvalidCookieDomainError:24,UnableToSetCookieError:25,ModalDialogOpenedError:26,ModalDialogOpenError:27,ScriptTimeoutError:28},t={};for(var u in s)t[s[u]]=u;r=t;
-q.prototype.toString=function(){return"["+this.name+"] "+this.message};function v(a){for(var b=1;b<arguments.length;b++){var c=String(arguments[b]).replace(/\$/g,"$$$$");a=a.replace(/\%s/,c)}return a};function w(a,b){b.unshift(a);m.call(this,v.apply(null,b));b.shift();this.i=a}l(w,m);w.prototype.name="AssertionError";function x(a,b){if(!a){var c=Array.prototype.slice.call(arguments,2),d="Assertion failed";if(b){d+=": "+b;var e=c}throw new w(""+d,e||[]);}return a};var y=Array.prototype,z=y.map?function(a,b,c){x(a.length!=null);return y.map.call(a,b,c)}:function(a,b,c){var d=a.length,e=Array(d),f=typeof a=="string"?a.split(""):a;for(var k=0;k<d;k++)if(k in f)e[k]=b.call(c,f[k],k,a);return e};var A="",B;if(B=/WebKit\/(\S+)/){var C=B.exec(this.navigator?this.navigator.userAgent:null);A=C?C[1]:""};function D(a,b){this.width=a;this.height=b}D.prototype.toString=function(){return"("+this.width+" x "+this.height+")"};D.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};var E="StopIteration"in this?this.StopIteration:Error("StopIteration");function F(){}F.prototype.next=function(){throw E;};function G(a,b,c,d,e){this.a=!!b;a&&H(this,a,d);this.d=e!=undefined?e:this.c||0;if(this.a)this.d*=-1;this.f=!c}l(G,F);G.prototype.b=null;G.prototype.c=0;G.prototype.e=false;function H(a,b,c,d){if(a.b=b)a.c=typeof c=="number"?c:a.b.nodeType!=1?0:a.a?-1:1;if(typeof d=="number")a.d=d}
-G.prototype.next=function(){var a;if(this.e){if(!this.b||this.f&&this.d==0)throw E;a=this.b;var b=this.a?-1:1;if(this.c==b){var c=this.a?a.lastChild:a.firstChild;c?H(this,c):H(this,a,b*-1)}else(c=this.a?a.previousSibling:a.nextSibling)?H(this,c):H(this,a.parentNode,b*-1);this.d+=this.c*(this.a?-1:1)}else this.e=true;a=this.b;if(!this.b)throw E;return a};
-G.prototype.splice=function(){var a=this.b,b=this.a?1:-1;if(this.c==b){this.c=b*-1;this.d+=this.c*(this.a?-1:1)}this.a=!this.a;G.prototype.next.call(this);this.a=!this.a;b=h(arguments[0])?arguments[0]:arguments;for(var c=b.length-1;c>=0;c--)a.parentNode&&a.parentNode.insertBefore(b[c],a.nextSibling);a&&a.parentNode&&a.parentNode.removeChild(a)};function I(a,b,c,d){G.call(this,a,b,c,null,d)}l(I,G);I.prototype.next=function(){do I.h.next.call(this);while(this.c==-1);return this.b};function J(a){if(g(a.getBBox)=="function")return a.getBBox();var b;b:{b=a.nodeType==9?a:a.ownerDocument||a.document;if(b.defaultView&&b.defaultView.getComputedStyle)if(b=b.defaultView.getComputedStyle(a,null)){b=b.display||b.getPropertyValue("display");break b}b=""}if((b||(a.currentStyle?a.currentStyle.display:null)||a.style.display)!="none")a=new D(a.offsetWidth,a.offsetHeight);else{b=a.style;var c=b.display,d=b.visibility,e=b.position;b.visibility="hidden";b.position="absolute";b.display="inline";
-var f;f=a.offsetWidth;a=a.offsetHeight;b.display=c;b.position=e;b.visibility=d;a=new D(f,a)}return a}String.fromCharCode(160);function K(){}
-function L(a,b,c){switch(typeof b){case "string":M(a,b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==null){c.push("null");break}if(g(b)=="array"){var d=b.length;c.push("[");var e="";for(var f=0;f<d;f++){c.push(e);L(a,b[f],c);e=","}c.push("]");break}c.push("{");d="";for(e in b)if(Object.prototype.hasOwnProperty.call(b,e)){f=b[e];if(typeof f!="function"){c.push(d);M(a,e,c);c.push(":");L(a,
-f,c);d=","}}c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var N={'"':'\\"',"\\":"\\\\","/":"\\/","\u0008":"\\b","\u000c":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\u000b":"\\u000b"},O=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g;
-function M(a,b,c){c.push('"',b.replace(O,function(d){if(d in N)return N[d];var e=d.charCodeAt(0),f="\\u";if(e<16)f+="000";else if(e<256)f+="00";else if(e<4096)f+="0";return N[d]=f+e.toString(16)}),'"')};function P(a){switch(g(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return z(a,P);case "object":a=a;if("nodeType"in a&&(a.nodeType==1||a.nodeType==9)){var b={};b.ELEMENT=Q(a);return b}if(h(a))return z(a,P);a=n(a,function(c,d){return typeof d=="number"||typeof d=="string"});return o(a,P);default:return null}}
-function R(a,b){if(g(a)=="array")return z(a,function(c){return R(c,b)});else if(i(a))return"ELEMENT"in a?S(a.ELEMENT,b):o(a,function(c){return R(c,b)});return a}function T(a){a=a||document;var b=a.$wdc_;if(!b){b=a.$wdc_={};b.g=j()}return b}function Q(a){var b=T(a.ownerDocument),c=p(b,function(d){return d==a});if(!c){c=":wdc:"+b.g++;b[c]=a}return c}
-function S(a,b){a=decodeURIComponent(a);var c=b||document,d=T(c);if(!(a in d))throw new q(10,"Element does not exist in cache");var e=d[a];for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new q(10,"Element is no longer attached to the DOM");};function U(a){var b=J;a=[a];var c;try{if(typeof b=="string")b=new Function(b);var d=R(a),e=b.apply(null,d);c={status:0,value:P(e)}}catch(f){c={status:"code"in f?f.code:13,value:{message:f.message}}}b=[];L(new K,c,b);return b.join("")}var V="_".split("."),W=this;!(V[0]in W)&&W.execScript&&W.execScript("var "+V[0]);for(var X;V.length&&(X=V.shift());)if(!V.length&&U!==undefined)W[X]=U;else W=W[X]?W[X]:W[X]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!='undefined'?window.navigator:null}, arguments);}
diff --git a/core/res/res/raw/get_text_android.js b/core/res/res/raw/get_text_android.js
deleted file mode 100644
index f74cb37..0000000
--- a/core/res/res/raw/get_text_android.js
+++ /dev/null
@@ -1,21 +0,0 @@
-function(){return function(){var g=this;
-function i(a){var b=typeof a;if(b=="object")if(a){if(a instanceof Array)return"array";else if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if(c=="[object Window]")return"object";if(c=="[object Array]"||typeof a.length=="number"&&typeof a.splice!="undefined"&&typeof a.propertyIsEnumerable!="undefined"&&!a.propertyIsEnumerable("splice"))return"array";if(c=="[object Function]"||typeof a.call!="undefined"&&typeof a.propertyIsEnumerable!="undefined"&&!a.propertyIsEnumerable("call"))return"function"}else return"null";else if(b==
-"function"&&typeof a.call=="undefined")return"object";return b}function j(a){var b=i(a);return b=="array"||b=="object"&&typeof a.length=="number"}function k(a){return typeof a=="string"}function aa(a){a=i(a);return a=="object"||a=="array"||a=="function"}Math.floor(Math.random()*2147483648).toString(36);var ba=Date.now||function(){return+new Date};function l(a,b){function c(){}c.prototype=b.prototype;a.i=b.prototype;a.prototype=new c};var ca=window;function da(){var a=g.Components;if(!a)return false;try{a.j["@mozilla.org/uuid-generator;1"].k(a.g.n);return true}catch(b){return false}};function m(a){this.stack=Error().stack||"";if(a)this.message=String(a)}l(m,Error);m.prototype.name="CustomError";function ea(a,b,c){var d={};for(var f in a)if(b.call(c,a[f],f,a))d[f]=a[f];return d}function n(a,b,c){var d={};for(var f in a)d[f]=b.call(c,a[f],f,a);return d}function fa(a,b,c){for(var d in a)if(b.call(c,a[d],d,a))return d};function o(a,b){m.call(this,b);this.code=a;this.name=p[a]||p[13]}l(o,m);var p,r={NoSuchElementError:7,NoSuchFrameError:8,UnknownCommandError:9,StaleElementReferenceError:10,ElementNotVisibleError:11,InvalidElementStateError:12,UnknownError:13,ElementNotSelectableError:15,XPathLookupError:19,NoSuchWindowError:23,InvalidCookieDomainError:24,UnableToSetCookieError:25,ModalDialogOpenedError:26,ModalDialogOpenError:27,ScriptTimeoutError:28},s={};for(var t in r)s[r[t]]=t;p=s;
-o.prototype.toString=function(){return"["+this.name+"] "+this.message};function ga(a){for(var b=1;b<arguments.length;b++){var c=String(arguments[b]).replace(/\$/g,"$$$$");a=a.replace(/\%s/,c)}return a}function u(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")}var v={};function ha(a){return v[a]||(v[a]=String(a).replace(/\-([a-z])/g,function(b,c){return c.toUpperCase()}))};function w(a,b){b.unshift(a);m.call(this,ga.apply(null,b));b.shift();this.l=a}l(w,m);w.prototype.name="AssertionError";function x(a,b){if(!a){var c=Array.prototype.slice.call(arguments,2),d="Assertion failed";if(b){d+=": "+b;var f=c}throw new w(""+d,f||[]);}return a};var y=Array.prototype,ia=y.indexOf?function(a,b,c){x(a.length!=null);return y.indexOf.call(a,b,c)}:function(a,b,c){c=c==null?0:c<0?Math.max(0,a.length+c):c;if(k(a)){if(!k(b)||b.length!=1)return-1;return a.indexOf(b,c)}for(c=c;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1},ja=y.forEach?function(a,b,c){x(a.length!=null);y.forEach.call(a,b,c)}:function(a,b,c){var d=a.length,f=k(a)?a.split(""):a;for(var e=0;e<d;e++)e in f&&b.call(c,f[e],e,a)},z=y.map?function(a,b,c){x(a.length!=null);return y.map.call(a,
-b,c)}:function(a,b,c){var d=a.length,f=Array(d),e=k(a)?a.split(""):a;for(var h=0;h<d;h++)if(h in e)f[h]=b.call(c,e[h],h,a);return f},ka=y.some?function(a,b,c){x(a.length!=null);return y.some.call(a,b,c)}:function(a,b,c){var d=a.length,f=k(a)?a.split(""):a;for(var e=0;e<d;e++)if(e in f&&b.call(c,f[e],e,a))return true;return false};var A=true,la="",B;if(A)B=/WebKit\/(\S+)/;if(B){var C=B.exec(g.navigator?g.navigator.userAgent:null);la=C?C[1]:""};function D(a,b){this.width=a;this.height=b}D.prototype.toString=function(){return"("+this.width+" x "+this.height+")"};D.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};function E(a){return a.nodeType==9?a:a.ownerDocument||a.document}function ma(a,b){var c=[];return F(a,b,c,true)?c[0]:undefined}function F(a,b,c,d){if(a!=null){var f=0;for(var e;e=a.childNodes[f];f++){if(b(e)){c.push(e);if(d)return true}if(F(e,b,c,d))return true}}return false}function G(a,b,c,d){if(!c)a=a.parentNode;c=d==null;for(var f=0;a&&(c||f<=d);){if(b(a))return a;a=a.parentNode;f++}return null};function na(a,b){var c=function(d,f){var e=E(d);if(d.selectSingleNode){e.setProperty&&e.setProperty("SelectionLanguage","XPath");return d.selectSingleNode(f)}else if(e.implementation.hasFeature("XPath","3.0")){var h=e.createNSResolver(e.documentElement),q;if(typeof XPathResult!="undefined")q=XPathResult.FIRST_ORDERED_NODE_TYPE;else{if(!da())throw Error("Document claims it supports XPath yet XPathResult is not defined. Please report this to Selenium developers");q=Components.g.m.FIRST_ORDERED_NODE_TYPE}return e.evaluate(f,
-d,h,q,null).singleNodeValue}return null}(b,a);if(!c)return null;if(c.nodeType!=1)throw Error("Returned node is not an element: "+a);return c};var H="StopIteration"in g?g.StopIteration:Error("StopIteration");function I(){}I.prototype.next=function(){throw H;};function J(a,b,c,d,f){this.a=!!b;a&&K(this,a,d);this.d=f!=undefined?f:this.c||0;if(this.a)this.d*=-1;this.f=!c}l(J,I);J.prototype.b=null;J.prototype.c=0;J.prototype.e=false;function K(a,b,c,d){if(a.b=b)a.c=typeof c=="number"?c:a.b.nodeType!=1?0:a.a?-1:1;if(typeof d=="number")a.d=d}
-J.prototype.next=function(){var a;if(this.e){if(!this.b||this.f&&this.d==0)throw H;a=this.b;var b=this.a?-1:1;if(this.c==b){var c=this.a?a.lastChild:a.firstChild;c?K(this,c):K(this,a,b*-1)}else(c=this.a?a.previousSibling:a.nextSibling)?K(this,c):K(this,a.parentNode,b*-1);this.d+=this.c*(this.a?-1:1)}else this.e=true;a=this.b;if(!this.b)throw H;return a};
-J.prototype.splice=function(){var a=this.b,b=this.a?1:-1;if(this.c==b){this.c=b*-1;this.d+=this.c*(this.a?-1:1)}this.a=!this.a;J.prototype.next.call(this);this.a=!this.a;b=j(arguments[0])?arguments[0]:arguments;for(var c=b.length-1;c>=0;c--)a.parentNode&&a.parentNode.insertBefore(b[c],a.nextSibling);a&&a.parentNode&&a.parentNode.removeChild(a)};function L(a,b,c,d){J.call(this,a,b,c,null,d)}l(L,J);L.prototype.next=function(){do L.i.next.call(this);while(this.c==-1);return this.b};function M(a,b){var c=E(a);if(c.defaultView&&c.defaultView.getComputedStyle)if(c=c.defaultView.getComputedStyle(a,null))return c[b]||c.getPropertyValue(b);return""};function N(a,b){return!!a&&a.nodeType==1&&(!b||a.tagName.toUpperCase()==b)}
-var oa=["async","autofocus","autoplay","checked","compact","complete","controls","declare","defaultchecked","defaultselected","defer","disabled","draggable","ended","formnovalidate","hidden","indeterminate","iscontenteditable","ismap","itemscope","loop","multiple","muted","nohref","noresize","noshade","novalidate","nowrap","open","paused","pubdate","readonly","required","reversed","scoped","seamless","seeking","selected","spellcheck","truespeed","willvalidate"];
-function pa(a,b){if(8==a.nodeType)return null;b=b.toLowerCase();if(b=="style"){var c=u(a.style.cssText).toLowerCase();return c.charAt(c.length-1)==";"?c:c+";"}c=a.getAttributeNode(b);if(!c)return null;if(ia(oa,b)>=0)return"true";return c.specified?c.value:null}function O(a){for(a=a.parentNode;a&&a.nodeType!=1&&a.nodeType!=9&&a.nodeType!=11;)a=a.parentNode;return N(a)?a:null}function P(a,b){b=ha(String(b));return M(a,b)||Q(a,b)}
-function Q(a,b){var c=(a.currentStyle||a.style)[b];if(c!="inherit")return c!==undefined?c:null;return(c=O(a))?Q(c,b):null}
-function qa(a){if(i(a.getBBox)=="function")return a.getBBox();var b;if((M(a,"display")||(a.currentStyle?a.currentStyle.display:null)||a.style.display)!="none")b=new D(a.offsetWidth,a.offsetHeight);else{b=a.style;var c=b.display,d=b.visibility,f=b.position;b.visibility="hidden";b.position="absolute";b.display="inline";var e;e=a.offsetWidth;a=a.offsetHeight;b.display=c;b.position=f;b.visibility=d;b=new D(e,a)}return b}
-function R(a,b){function c(e){if(P(e,"display")=="none")return false;e=O(e);return!e||c(e)}function d(e){var h=qa(e);if(h.height>0&&h.width>0)return true;if(e.innerText||e.textContent)if(ra.test(e.innerText||e.textContent))return true;return A&&ka(e.childNodes,function(q){return N(q)&&d(q)})}if(!N(a))throw Error("Argument to isShown must be of type Element");if(N(a,"TITLE"))return(E(a)?E(a).parentWindow||E(a).defaultView:window)==ca;if(N(a,"OPTION")||N(a,"OPTGROUP")){var f=G(a,function(e){return N(e,
-"SELECT")});return!!f&&R(f)}if(N(a,"MAP")){if(!a.name)return false;f=E(a);f=f.evaluate?na('/descendant::*[@usemap = "#'+a.name+'"]',f):ma(f,function(e){return N(e)&&pa(e,"usemap")=="#"+a.name});return!!f&&R(f)}if(N(a,"AREA")){f=G(a,function(e){return N(e,"MAP")});return!!f&&R(f)}if(N(a,"INPUT")&&a.type.toLowerCase()=="hidden")return false;if(P(a,"visibility")=="hidden")return false;if(!c(a))return false;if(!b&&S(a)==0)return false;if(!d(a))return false;return true}
-function sa(a){var b=[];T(a,b);b=z(b,u);return u(b.join("\n"))}function T(a,b){if(N(a,"BR"))b.push("");else{var c=ta(a);c&&b[b.length-1]&&b.push("");ja(a.childNodes,function(d){if(d.nodeType==3){var f=O(d);if(f){R(f);if(f&&R(f)){d=d.nodeValue.replace(ua," ");f=b.pop()||"";var e=f.length-1;if(e>=0&&f.indexOf(" ",e)==e&&d.lastIndexOf(" ",0)==0)d=d.substr(1);b.push(f+d)}}}else N(d)&&T(d,b)});c&&b[b.length-1]&&b.push("")}}function ta(a){a=P(a,"display");return a=="block"||a=="list-item"}
-var va="[\\s\\xa0"+String.fromCharCode(160)+"]+",ua=RegExp(va,"g"),ra=RegExp("^"+va+"$");function S(a){var b=1,c=P(a,"opacity");if(c)b=Number(c);if(a=O(a))b*=S(a);return b};function wa(){}
-function U(a,b,c){switch(typeof b){case "string":xa(a,b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==null){c.push("null");break}if(i(b)=="array"){var d=b.length;c.push("[");var f="";for(var e=0;e<d;e++){c.push(f);U(a,b[e],c);f=","}c.push("]");break}c.push("{");d="";for(f in b)if(Object.prototype.hasOwnProperty.call(b,f)){e=b[f];if(typeof e!="function"){c.push(d);xa(a,f,c);c.push(":");U(a,
-e,c);d=","}}c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var V={'"':'\\"',"\\":"\\\\","/":"\\/","\u0008":"\\b","\u000c":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\u000b":"\\u000b"},ya=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g;
-function xa(a,b,c){c.push('"',b.replace(ya,function(d){if(d in V)return V[d];var f=d.charCodeAt(0),e="\\u";if(f<16)e+="000";else if(f<256)e+="00";else if(f<4096)e+="0";return V[d]=e+f.toString(16)}),'"')};function W(a){switch(i(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return z(a,W);case "object":a=a;if("nodeType"in a&&(a.nodeType==1||a.nodeType==9)){var b={};b.ELEMENT=za(a);return b}if(j(a))return z(a,W);a=ea(a,function(c,d){return typeof d=="number"||k(d)});return n(a,W);default:return null}}
-function X(a,b){if(i(a)=="array")return z(a,function(c){return X(c,b)});else if(aa(a))return"ELEMENT"in a?Aa(a.ELEMENT,b):n(a,function(c){return X(c,b)});return a}function Ba(a){a=a||document;var b=a.$wdc_;if(!b){b=a.$wdc_={};b.h=ba()}return b}function za(a){var b=Ba(a.ownerDocument),c=fa(b,function(d){return d==a});if(!c){c=":wdc:"+b.h++;b[c]=a}return c}
-function Aa(a,b){a=decodeURIComponent(a);var c=b||document,d=Ba(c);if(!(a in d))throw new o(10,"Element does not exist in cache");var f=d[a];for(var e=f;e;){if(e==c.documentElement)return f;e=e.parentNode}delete d[a];throw new o(10,"Element is no longer attached to the DOM");};function Ca(a){var b=sa;a=[a];var c;try{if(k(b))b=new Function(b);var d=X(a),f=b.apply(null,d);c={status:0,value:W(f)}}catch(e){c={status:"code"in e?e.code:13,value:{message:e.message}}}b=[];U(new wa,c,b);return b.join("")}var Y="_".split("."),Z=g;!(Y[0]in Z)&&Z.execScript&&Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());)if(!Y.length&&Ca!==undefined)Z[$]=Ca;else Z=Z[$]?Z[$]:Z[$]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!='undefined'?window.navigator:null}, arguments);}
diff --git a/core/res/res/raw/get_top_left_coordinates_android.js b/core/res/res/raw/get_top_left_coordinates_android.js
deleted file mode 100644
index 398f204..0000000
--- a/core/res/res/raw/get_top_left_coordinates_android.js
+++ /dev/null
@@ -1,18 +0,0 @@
-function(){return function(){var h=this;
-function j(a){var b=typeof a;if(b=="object")if(a){if(a instanceof Array)return"array";else if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if(c=="[object Window]")return"object";if(c=="[object Array]"||typeof a.length=="number"&&typeof a.splice!="undefined"&&typeof a.propertyIsEnumerable!="undefined"&&!a.propertyIsEnumerable("splice"))return"array";if(c=="[object Function]"||typeof a.call!="undefined"&&typeof a.propertyIsEnumerable!="undefined"&&!a.propertyIsEnumerable("call"))return"function"}else return"null";else if(b==
-"function"&&typeof a.call=="undefined")return"object";return b}function l(a){var b=j(a);return b=="array"||b=="object"&&typeof a.length=="number"}function aa(a){a=j(a);return a=="object"||a=="array"||a=="function"}Math.floor(Math.random()*2147483648).toString(36);var ba=Date.now||function(){return+new Date};function m(a,b){function c(){}c.prototype=b.prototype;a.j=b.prototype;a.prototype=new c};function n(a){this.stack=Error().stack||"";if(a)this.message=String(a)}m(n,Error);n.prototype.name="CustomError";function ca(a,b,c){var d={};for(var f in a)if(b.call(c,a[f],f,a))d[f]=a[f];return d}function o(a,b,c){var d={};for(var f in a)d[f]=b.call(c,a[f],f,a);return d}function da(a,b,c){for(var d in a)if(b.call(c,a[d],d,a))return d};function p(a,b){n.call(this,b);this.code=a;this.name=q[a]||q[13]}m(p,n);var q,r={NoSuchElementError:7,NoSuchFrameError:8,UnknownCommandError:9,StaleElementReferenceError:10,ElementNotVisibleError:11,InvalidElementStateError:12,UnknownError:13,ElementNotSelectableError:15,XPathLookupError:19,NoSuchWindowError:23,InvalidCookieDomainError:24,UnableToSetCookieError:25,ModalDialogOpenedError:26,ModalDialogOpenError:27,ScriptTimeoutError:28},s={};for(var t in r)s[r[t]]=t;q=s;
-p.prototype.toString=function(){return"["+this.name+"] "+this.message};function ea(a){for(var b=1;b<arguments.length;b++){var c=String(arguments[b]).replace(/\$/g,"$$$$");a=a.replace(/\%s/,c)}return a}function y(a,b){if(a<b)return-1;else if(a>b)return 1;return 0};function z(a,b){b.unshift(a);n.call(this,ea.apply(null,b));b.shift();this.k=a}m(z,n);z.prototype.name="AssertionError";function fa(a,b){if(!a){var c=Array.prototype.slice.call(arguments,2),d="Assertion failed";if(b){d+=": "+b;var f=c}throw new z(""+d,f||[]);}return a};var A=Array.prototype,B=A.map?function(a,b,c){fa(a.length!=null);return A.map.call(a,b,c)}:function(a,b,c){var d=a.length,f=Array(d),e=typeof a=="string"?a.split(""):a;for(var g=0;g<d;g++)if(g in e)f[g]=b.call(c,e[g],g,a);return f};var C,F="",G;if(G=/WebKit\/(\S+)/){var H=G.exec(h.navigator?h.navigator.userAgent:null);F=H?H[1]:""}C=F;var ga={};var ha;function I(a,b){this.x=a!==undefined?a:0;this.y=b!==undefined?b:0}I.prototype.toString=function(){return"("+this.x+", "+this.y+")"};function J(a,b){this.width=a;this.height=b}J.prototype.toString=function(){return"("+this.width+" x "+this.height+")"};J.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};function K(a){return a?new ia(L(a)):ha||(ha=new ia)}function L(a){return a.nodeType==9?a:a.ownerDocument||a.document}function ia(a){this.e=a||h.document||document}function ja(a){a=a.e.body;return new I(a.scrollLeft,a.scrollTop)};var M="StopIteration"in h?h.StopIteration:Error("StopIteration");function ka(){}ka.prototype.next=function(){throw M;};function N(a,b,c,d,f){this.a=!!b;a&&O(this,a,d);this.d=f!=undefined?f:this.c||0;if(this.a)this.d*=-1;this.h=!c}m(N,ka);N.prototype.b=null;N.prototype.c=0;N.prototype.g=false;function O(a,b,c,d){if(a.b=b)a.c=typeof c=="number"?c:a.b.nodeType!=1?0:a.a?-1:1;if(typeof d=="number")a.d=d}
-N.prototype.next=function(){var a;if(this.g){if(!this.b||this.h&&this.d==0)throw M;a=this.b;var b=this.a?-1:1;if(this.c==b){var c=this.a?a.lastChild:a.firstChild;c?O(this,c):O(this,a,b*-1)}else(c=this.a?a.previousSibling:a.nextSibling)?O(this,c):O(this,a.parentNode,b*-1);this.d+=this.c*(this.a?-1:1)}else this.g=true;a=this.b;if(!this.b)throw M;return a};
-N.prototype.splice=function(){var a=this.b,b=this.a?1:-1;if(this.c==b){this.c=b*-1;this.d+=this.c*(this.a?-1:1)}this.a=!this.a;N.prototype.next.call(this);this.a=!this.a;b=l(arguments[0])?arguments[0]:arguments;for(var c=b.length-1;c>=0;c--)a.parentNode&&a.parentNode.insertBefore(b[c],a.nextSibling);a&&a.parentNode&&a.parentNode.removeChild(a)};function P(a,b,c,d){N.call(this,a,b,c,null,d)}m(P,N);P.prototype.next=function(){do P.j.next.call(this);while(this.c==-1);return this.b};function la(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}la.prototype.toString=function(){return"("+this.top+"t, "+this.right+"r, "+this.bottom+"b, "+this.left+"l)"};function Q(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d}Q.prototype.toString=function(){return"("+this.left+", "+this.top+" - "+this.width+"w x "+this.height+"h)"};function R(a,b){var c=L(a);if(c.defaultView&&c.defaultView.getComputedStyle)if(c=c.defaultView.getComputedStyle(a,null))return c[b]||c.getPropertyValue(b);return""}function S(a,b){return R(a,b)||(a.currentStyle?a.currentStyle[b]:null)||a.style[b]}
-function ma(a){var b=L(a),c=S(a,"position"),d=c=="fixed"||c=="absolute";for(a=a.parentNode;a&&a!=b;a=a.parentNode){c=S(a,"position");d=d&&c=="static"&&a!=b.documentElement&&a!=b.body;if(!d&&(a.scrollWidth>a.clientWidth||a.scrollHeight>a.clientHeight||c=="fixed"||c=="absolute"))return a}return null}
-function T(a){var b=L(a),c=S(a,"position"),d=new I(0,0),f=(b?b.nodeType==9?b:L(b):document).documentElement;if(a==f)return d;if(a.getBoundingClientRect){a=a.getBoundingClientRect();b=ja(K(b));d.x=a.left+b.x;d.y=a.top+b.y}else if(b.getBoxObjectFor){a=b.getBoxObjectFor(a);b=b.getBoxObjectFor(f);d.x=a.screenX-b.screenX;d.y=a.screenY-b.screenY}else{var e=a;do{d.x+=e.offsetLeft;d.y+=e.offsetTop;if(e!=a){d.x+=e.clientLeft||0;d.y+=e.clientTop||0}if(S(e,"position")=="fixed"){d.x+=b.body.scrollLeft;d.y+=b.body.scrollTop;
-break}e=e.offsetParent}while(e&&e!=a);if(c=="absolute")d.y-=b.body.offsetTop;for(e=a;(e=ma(e))&&e!=b.body&&e!=f;){d.x-=e.scrollLeft;d.y-=e.scrollTop}}return d};String.fromCharCode(160);function na(a,b){b.scrollLeft+=Math.min(a.left,Math.max(a.left-a.width,0));b.scrollTop+=Math.min(a.top,Math.max(a.top-a.height,0))}
-function oa(a,b){var c;c=b?new Q(b.left,b.top,b.width,b.height):new Q(0,0,a.offsetWidth,a.offsetHeight);var d=L(a);for(var f=a.parentNode;f&&f!=d.body&&f!=d.documentElement;){var e=c,g=f,u=T(a),v=T(g),i=void 0;i=void 0;var k=void 0,D=void 0,E=void 0;E=R(g,"borderLeftWidth");D=R(g,"borderRightWidth");k=R(g,"borderTopWidth");i=R(g,"borderBottomWidth");i=new la(parseFloat(k),parseFloat(D),parseFloat(i),parseFloat(E));na(new Q(u.x+e.left-v.x-i.left,u.y+e.top-v.y-i.top,g.clientWidth-e.width,g.clientHeight-
-e.height),g);f=f.parentNode}f=T(a);e=K(d);e=(e.e.parentWindow||e.e.defaultView||window).document;if(!ga["500"]){g=0;u=String(C).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split(".");v=String("500").replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split(".");i=Math.max(u.length,v.length);for(k=0;g==0&&k<i;k++){D=u[k]||"";E=v[k]||"";var sa=RegExp("(\\d*)(\\D*)","g"),ta=RegExp("(\\d*)(\\D*)","g");do{var w=sa.exec(D)||["","",""],x=ta.exec(E)||["","",""];if(w[0].length==0&&x[0].length==0)break;g=y(w[1].length==0?0:parseInt(w[1],
-10),x[1].length==0?0:parseInt(x[1],10))||y(w[2].length==0,x[2].length==0)||y(w[2],x[2])}while(g==0)}ga["500"]=g>=0}e=e.compatMode=="CSS1Compat"?e.documentElement:e.body;e=new J(e.clientWidth,e.clientHeight);na(new Q(f.x+c.left-d.body.scrollLeft,f.y+c.top-d.body.scrollTop,e.width-c.width,e.height-c.height),d.body);d=new I;if(a.nodeType==1)if(a.getBoundingClientRect){f=a.getBoundingClientRect();d.x=f.left;d.y=f.top}else{f=ja(K(a));e=T(a);d.x=e.x-f.x;d.y=e.y-f.y}else{f=j(a.f)=="function";e=a;if(a.targetTouches)e=
-a.targetTouches[0];else if(f&&a.f().targetTouches)e=a.f().targetTouches[0];d.x=e.clientX;d.y=e.clientY}return new I(d.x+c.left,d.y+c.top)};function pa(){}
-function U(a,b,c){switch(typeof b){case "string":qa(a,b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==null){c.push("null");break}if(j(b)=="array"){var d=b.length;c.push("[");var f="";for(var e=0;e<d;e++){c.push(f);U(a,b[e],c);f=","}c.push("]");break}c.push("{");d="";for(f in b)if(Object.prototype.hasOwnProperty.call(b,f)){e=b[f];if(typeof e!="function"){c.push(d);qa(a,f,c);c.push(":");U(a,
-e,c);d=","}}c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var V={'"':'\\"',"\\":"\\\\","/":"\\/","\u0008":"\\b","\u000c":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\u000b":"\\u000b"},ra=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g;
-function qa(a,b,c){c.push('"',b.replace(ra,function(d){if(d in V)return V[d];var f=d.charCodeAt(0),e="\\u";if(f<16)e+="000";else if(f<256)e+="00";else if(f<4096)e+="0";return V[d]=e+f.toString(16)}),'"')};function W(a){switch(j(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return B(a,W);case "object":a=a;if("nodeType"in a&&(a.nodeType==1||a.nodeType==9)){var b={};b.ELEMENT=ua(a);return b}if(l(a))return B(a,W);a=ca(a,function(c,d){return typeof d=="number"||typeof d=="string"});return o(a,W);default:return null}}
-function X(a,b){if(j(a)=="array")return B(a,function(c){return X(c,b)});else if(aa(a))return"ELEMENT"in a?va(a.ELEMENT,b):o(a,function(c){return X(c,b)});return a}function wa(a){a=a||document;var b=a.$wdc_;if(!b){b=a.$wdc_={};b.i=ba()}return b}function ua(a){var b=wa(a.ownerDocument),c=da(b,function(d){return d==a});if(!c){c=":wdc:"+b.i++;b[c]=a}return c}
-function va(a,b){a=decodeURIComponent(a);var c=b||document,d=wa(c);if(!(a in d))throw new p(10,"Element does not exist in cache");var f=d[a];for(var e=f;e;){if(e==c.documentElement)return f;e=e.parentNode}delete d[a];throw new p(10,"Element is no longer attached to the DOM");};function xa(a){var b=oa;a=[a];var c;try{if(typeof b=="string")b=new Function(b);var d=X(a),f=b.apply(null,d);c={status:0,value:W(f)}}catch(e){c={status:"code"in e?e.code:13,value:{message:e.message}}}b=[];U(new pa,c,b);return b.join("")}var Y="_".split("."),Z=h;!(Y[0]in Z)&&Z.execScript&&Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());)if(!Y.length&&xa!==undefined)Z[$]=xa;else Z=Z[$]?Z[$]:Z[$]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!='undefined'?window.navigator:null}, arguments);}
diff --git a/core/res/res/raw/get_value_of_css_property_android.js b/core/res/res/raw/get_value_of_css_property_android.js
deleted file mode 100644
index 0989b04..0000000
--- a/core/res/res/raw/get_value_of_css_property_android.js
+++ /dev/null
@@ -1,10 +0,0 @@
-function(){return function(){function g(a){var c=typeof a;if(c=="object")if(a){if(a instanceof Array)return"array";else if(a instanceof Object)return c;var b=Object.prototype.toString.call(a);if(b=="[object Window]")return"object";if(b=="[object Array]"||typeof a.length=="number"&&typeof a.splice!="undefined"&&typeof a.propertyIsEnumerable!="undefined"&&!a.propertyIsEnumerable("splice"))return"array";if(b=="[object Function]"||typeof a.call!="undefined"&&typeof a.propertyIsEnumerable!="undefined"&&!a.propertyIsEnumerable("call"))return"function"}else return"null";
-else if(c=="function"&&typeof a.call=="undefined")return"object";return c}function i(a){var c=g(a);return c=="array"||c=="object"&&typeof a.length=="number"}function j(a){a=g(a);return a=="object"||a=="array"||a=="function"}Math.floor(Math.random()*2147483648).toString(36);var k=Date.now||function(){return+new Date};function l(a,c){function b(){}b.prototype=c.prototype;a.h=c.prototype;a.prototype=new b};function m(a){this.stack=Error().stack||"";if(a)this.message=String(a)}l(m,Error);m.prototype.name="CustomError";function n(a,c,b){var d={};for(var e in a)if(c.call(b,a[e],e,a))d[e]=a[e];return d}function o(a,c,b){var d={};for(var e in a)d[e]=c.call(b,a[e],e,a);return d}function p(a,c,b){for(var d in a)if(c.call(b,a[d],d,a))return d};function q(a,c){m.call(this,c);this.code=a;this.name=r[a]||r[13]}l(q,m);var r,s={NoSuchElementError:7,NoSuchFrameError:8,UnknownCommandError:9,StaleElementReferenceError:10,ElementNotVisibleError:11,InvalidElementStateError:12,UnknownError:13,ElementNotSelectableError:15,XPathLookupError:19,NoSuchWindowError:23,InvalidCookieDomainError:24,UnableToSetCookieError:25,ModalDialogOpenedError:26,ModalDialogOpenError:27,ScriptTimeoutError:28},t={};for(var u in s)t[s[u]]=u;r=t;
-q.prototype.toString=function(){return"["+this.name+"] "+this.message};function v(a){for(var c=1;c<arguments.length;c++){var b=String(arguments[c]).replace(/\$/g,"$$$$");a=a.replace(/\%s/,b)}return a};function w(a,c){c.unshift(a);m.call(this,v.apply(null,c));c.shift();this.i=a}l(w,m);w.prototype.name="AssertionError";function x(a,c){if(!a){var b=Array.prototype.slice.call(arguments,2),d="Assertion failed";if(c){d+=": "+c;var e=b}throw new w(""+d,e||[]);}return a};var y=Array.prototype,A=y.map?function(a,c,b){x(a.length!=null);return y.map.call(a,c,b)}:function(a,c,b){var d=a.length,e=Array(d),f=typeof a=="string"?a.split(""):a;for(var h=0;h<d;h++)if(h in f)e[h]=c.call(b,f[h],h,a);return e};var B="",C;if(C=/WebKit\/(\S+)/){var D=C.exec(this.navigator?this.navigator.userAgent:null);B=D?D[1]:""};var E="StopIteration"in this?this.StopIteration:Error("StopIteration");function F(){}F.prototype.next=function(){throw E;};function G(a,c,b,d,e){this.a=!!c;a&&H(this,a,d);this.d=e!=undefined?e:this.c||0;if(this.a)this.d*=-1;this.f=!b}l(G,F);G.prototype.b=null;G.prototype.c=0;G.prototype.e=false;function H(a,c,b,d){if(a.b=c)a.c=typeof b=="number"?b:a.b.nodeType!=1?0:a.a?-1:1;if(typeof d=="number")a.d=d}
-G.prototype.next=function(){var a;if(this.e){if(!this.b||this.f&&this.d==0)throw E;a=this.b;var c=this.a?-1:1;if(this.c==c){var b=this.a?a.lastChild:a.firstChild;b?H(this,b):H(this,a,c*-1)}else(b=this.a?a.previousSibling:a.nextSibling)?H(this,b):H(this,a.parentNode,c*-1);this.d+=this.c*(this.a?-1:1)}else this.e=true;a=this.b;if(!this.b)throw E;return a};
-G.prototype.splice=function(){var a=this.b,c=this.a?1:-1;if(this.c==c){this.c=c*-1;this.d+=this.c*(this.a?-1:1)}this.a=!this.a;G.prototype.next.call(this);this.a=!this.a;c=i(arguments[0])?arguments[0]:arguments;for(var b=c.length-1;b>=0;b--)a.parentNode&&a.parentNode.insertBefore(c[b],a.nextSibling);a&&a.parentNode&&a.parentNode.removeChild(a)};function I(a,c,b,d){G.call(this,a,c,b,null,d)}l(I,G);I.prototype.next=function(){do I.h.next.call(this);while(this.c==-1);return this.b};function J(a,c){var b=(a.currentStyle||a.style)[c];if(b!="inherit")return b!==undefined?b:null;for(b=a.parentNode;b&&b.nodeType!=1&&b.nodeType!=9&&b.nodeType!=11;)b=b.parentNode;return(b=b&&b.nodeType==1&&1?b:null)?J(b,c):null}String.fromCharCode(160);function K(){}
-function L(a,c,b){switch(typeof c){case "string":M(a,c,b);break;case "number":b.push(isFinite(c)&&!isNaN(c)?c:"null");break;case "boolean":b.push(c);break;case "undefined":b.push("null");break;case "object":if(c==null){b.push("null");break}if(g(c)=="array"){var d=c.length;b.push("[");var e="";for(var f=0;f<d;f++){b.push(e);L(a,c[f],b);e=","}b.push("]");break}b.push("{");d="";for(e in c)if(Object.prototype.hasOwnProperty.call(c,e)){f=c[e];if(typeof f!="function"){b.push(d);M(a,e,b);b.push(":");L(a,
-f,b);d=","}}b.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof c);}}var N={'"':'\\"',"\\":"\\\\","/":"\\/","\u0008":"\\b","\u000c":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\u000b":"\\u000b"},O=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g;
-function M(a,c,b){b.push('"',c.replace(O,function(d){if(d in N)return N[d];var e=d.charCodeAt(0),f="\\u";if(e<16)f+="000";else if(e<256)f+="00";else if(e<4096)f+="0";return N[d]=f+e.toString(16)}),'"')};function P(a){switch(g(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return A(a,P);case "object":a=a;if("nodeType"in a&&(a.nodeType==1||a.nodeType==9)){var c={};c.ELEMENT=Q(a);return c}if(i(a))return A(a,P);a=n(a,function(b,d){return typeof d=="number"||typeof d=="string"});return o(a,P);default:return null}}
-function R(a,c){if(g(a)=="array")return A(a,function(b){return R(b,c)});else if(j(a))return"ELEMENT"in a?S(a.ELEMENT,c):o(a,function(b){return R(b,c)});return a}function T(a){a=a||document;var c=a.$wdc_;if(!c){c=a.$wdc_={};c.g=k()}return c}function Q(a){var c=T(a.ownerDocument),b=p(c,function(d){return d==a});if(!b){b=":wdc:"+c.g++;c[b]=a}return b}
-function S(a,c){a=decodeURIComponent(a);var b=c||document,d=T(b);if(!(a in d))throw new q(10,"Element does not exist in cache");var e=d[a];for(var f=e;f;){if(f==b.documentElement)return e;f=f.parentNode}delete d[a];throw new q(10,"Element is no longer attached to the DOM");};function U(a,c){var b=J,d=[a,c],e;try{if(typeof b=="string")b=new Function(b);var f=R(d),h=b.apply(null,f);e={status:0,value:P(h)}}catch(z){e={status:"code"in z?z.code:13,value:{message:z.message}}}b=[];L(new K,e,b);return b.join("")}var V="_".split("."),W=this;!(V[0]in W)&&W.execScript&&W.execScript("var "+V[0]);for(var X;V.length&&(X=V.shift());)if(!V.length&&U!==undefined)W[X]=U;else W=W[X]?W[X]:W[X]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!='undefined'?window.navigator:null}, arguments);}
diff --git a/core/res/res/raw/is_displayed_android.js b/core/res/res/raw/is_displayed_android.js
deleted file mode 100644
index 154e319..0000000
--- a/core/res/res/raw/is_displayed_android.js
+++ /dev/null
@@ -1,20 +0,0 @@
-function(){return function(){var g=this;
-function i(a){var b=typeof a;if(b=="object")if(a){if(a instanceof Array)return"array";else if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if(c=="[object Window]")return"object";if(c=="[object Array]"||typeof a.length=="number"&&typeof a.splice!="undefined"&&typeof a.propertyIsEnumerable!="undefined"&&!a.propertyIsEnumerable("splice"))return"array";if(c=="[object Function]"||typeof a.call!="undefined"&&typeof a.propertyIsEnumerable!="undefined"&&!a.propertyIsEnumerable("call"))return"function"}else return"null";else if(b==
-"function"&&typeof a.call=="undefined")return"object";return b}function j(a){var b=i(a);return b=="array"||b=="object"&&typeof a.length=="number"}function k(a){return typeof a=="string"}function aa(a){a=i(a);return a=="object"||a=="array"||a=="function"}Math.floor(Math.random()*2147483648).toString(36);var l=Date.now||function(){return+new Date};function m(a,b){function c(){}c.prototype=b.prototype;a.i=b.prototype;a.prototype=new c};var ba=window;function ca(){var a=g.Components;if(!a)return false;try{a.j["@mozilla.org/uuid-generator;1"].k(a.h.n);return true}catch(b){return false}};function n(a){this.stack=Error().stack||"";if(a)this.message=String(a)}m(n,Error);n.prototype.name="CustomError";function da(a,b,c){var e={};for(var f in a)if(b.call(c,a[f],f,a))e[f]=a[f];return e}function o(a,b,c){var e={};for(var f in a)e[f]=b.call(c,a[f],f,a);return e}function ea(a,b,c){for(var e in a)if(b.call(c,a[e],e,a))return e};function p(a,b){n.call(this,b);this.code=a;this.name=r[a]||r[13]}m(p,n);var r,s={NoSuchElementError:7,NoSuchFrameError:8,UnknownCommandError:9,StaleElementReferenceError:10,ElementNotVisibleError:11,InvalidElementStateError:12,UnknownError:13,ElementNotSelectableError:15,XPathLookupError:19,NoSuchWindowError:23,InvalidCookieDomainError:24,UnableToSetCookieError:25,ModalDialogOpenedError:26,ModalDialogOpenError:27,ScriptTimeoutError:28},t={};for(var u in s)t[s[u]]=u;r=t;
-p.prototype.toString=function(){return"["+this.name+"] "+this.message};function fa(a){for(var b=1;b<arguments.length;b++){var c=String(arguments[b]).replace(/\$/g,"$$$$");a=a.replace(/\%s/,c)}return a}var v={};function ga(a){return v[a]||(v[a]=String(a).replace(/\-([a-z])/g,function(b,c){return c.toUpperCase()}))};function w(a,b){b.unshift(a);n.call(this,fa.apply(null,b));b.shift();this.l=a}m(w,n);w.prototype.name="AssertionError";function x(a,b){if(!a){var c=Array.prototype.slice.call(arguments,2),e="Assertion failed";if(b){e+=": "+b;var f=c}throw new w(""+e,f||[]);}return a};var y=Array.prototype,ha=y.indexOf?function(a,b,c){x(a.length!=null);return y.indexOf.call(a,b,c)}:function(a,b,c){c=c==null?0:c<0?Math.max(0,a.length+c):c;if(k(a)){if(!k(b)||b.length!=1)return-1;return a.indexOf(b,c)}for(c=c;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1},z=y.map?function(a,b,c){x(a.length!=null);return y.map.call(a,b,c)}:function(a,b,c){var e=a.length,f=Array(e),d=k(a)?a.split(""):a;for(var h=0;h<e;h++)if(h in d)f[h]=b.call(c,d[h],h,a);return f},ia=y.some?function(a,b,c){x(a.length!=
-null);return y.some.call(a,b,c)}:function(a,b,c){var e=a.length,f=k(a)?a.split(""):a;for(var d=0;d<e;d++)if(d in f&&b.call(c,f[d],d,a))return true;return false};var A=true,ja="",B;if(A)B=/WebKit\/(\S+)/;if(B){var C=B.exec(g.navigator?g.navigator.userAgent:null);ja=C?C[1]:""};function D(a,b){this.width=a;this.height=b}D.prototype.toString=function(){return"("+this.width+" x "+this.height+")"};D.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};function E(a){return a.nodeType==9?a:a.ownerDocument||a.document}function ka(a,b){var c=[];return F(a,b,c,true)?c[0]:undefined}function F(a,b,c,e){if(a!=null){var f=0;for(var d;d=a.childNodes[f];f++){if(b(d)){c.push(d);if(e)return true}if(F(d,b,c,e))return true}}return false}function G(a,b,c,e){if(!c)a=a.parentNode;c=e==null;for(var f=0;a&&(c||f<=e);){if(b(a))return a;a=a.parentNode;f++}return null};function la(a,b){var c=function(e,f){var d=E(e);if(e.selectSingleNode){d.setProperty&&d.setProperty("SelectionLanguage","XPath");return e.selectSingleNode(f)}else if(d.implementation.hasFeature("XPath","3.0")){var h=d.createNSResolver(d.documentElement),q;if(typeof XPathResult!="undefined")q=XPathResult.FIRST_ORDERED_NODE_TYPE;else{if(!ca())throw Error("Document claims it supports XPath yet XPathResult is not defined. Please report this to Selenium developers");q=Components.h.m.FIRST_ORDERED_NODE_TYPE}return d.evaluate(f,
-e,h,q,null).singleNodeValue}return null}(b,a);if(!c)return null;if(c.nodeType!=1)throw Error("Returned node is not an element: "+a);return c};var H="StopIteration"in g?g.StopIteration:Error("StopIteration");function I(){}I.prototype.next=function(){throw H;};function J(a,b,c,e,f){this.a=!!b;a&&K(this,a,e);this.d=f!=undefined?f:this.c||0;if(this.a)this.d*=-1;this.g=!c}m(J,I);J.prototype.b=null;J.prototype.c=0;J.prototype.f=false;function K(a,b,c,e){if(a.b=b)a.c=typeof c=="number"?c:a.b.nodeType!=1?0:a.a?-1:1;if(typeof e=="number")a.d=e}
-J.prototype.next=function(){var a;if(this.f){if(!this.b||this.g&&this.d==0)throw H;a=this.b;var b=this.a?-1:1;if(this.c==b){var c=this.a?a.lastChild:a.firstChild;c?K(this,c):K(this,a,b*-1)}else(c=this.a?a.previousSibling:a.nextSibling)?K(this,c):K(this,a.parentNode,b*-1);this.d+=this.c*(this.a?-1:1)}else this.f=true;a=this.b;if(!this.b)throw H;return a};
-J.prototype.splice=function(){var a=this.b,b=this.a?1:-1;if(this.c==b){this.c=b*-1;this.d+=this.c*(this.a?-1:1)}this.a=!this.a;J.prototype.next.call(this);this.a=!this.a;b=j(arguments[0])?arguments[0]:arguments;for(var c=b.length-1;c>=0;c--)a.parentNode&&a.parentNode.insertBefore(b[c],a.nextSibling);a&&a.parentNode&&a.parentNode.removeChild(a)};function L(a,b,c,e){J.call(this,a,b,c,null,e)}m(L,J);L.prototype.next=function(){do L.i.next.call(this);while(this.c==-1);return this.b};function M(a,b){var c=E(a);if(c.defaultView&&c.defaultView.getComputedStyle)if(c=c.defaultView.getComputedStyle(a,null))return c[b]||c.getPropertyValue(b);return""};function N(a,b){return!!a&&a.nodeType==1&&(!b||a.tagName.toUpperCase()==b)}
-var ma=["async","autofocus","autoplay","checked","compact","complete","controls","declare","defaultchecked","defaultselected","defer","disabled","draggable","ended","formnovalidate","hidden","indeterminate","iscontenteditable","ismap","itemscope","loop","multiple","muted","nohref","noresize","noshade","novalidate","nowrap","open","paused","pubdate","readonly","required","reversed","scoped","seamless","seeking","selected","spellcheck","truespeed","willvalidate"];
-function na(a,b){if(8==a.nodeType)return null;b=b.toLowerCase();if(b=="style"){var c=a.style.cssText.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").toLowerCase();return c.charAt(c.length-1)==";"?c:c+";"}c=a.getAttributeNode(b);if(!c)return null;if(ha(ma,b)>=0)return"true";return c.specified?c.value:null}function O(a){for(a=a.parentNode;a&&a.nodeType!=1&&a.nodeType!=9&&a.nodeType!=11;)a=a.parentNode;return N(a)?a:null}function P(a,b){b=ga(String(b));return M(a,b)||Q(a,b)}
-function Q(a,b){var c=(a.currentStyle||a.style)[b];if(c!="inherit")return c!==undefined?c:null;return(c=O(a))?Q(c,b):null}
-function oa(a){if(i(a.getBBox)=="function")return a.getBBox();var b;if((M(a,"display")||(a.currentStyle?a.currentStyle.display:null)||a.style.display)!="none")b=new D(a.offsetWidth,a.offsetHeight);else{b=a.style;var c=b.display,e=b.visibility,f=b.position;b.visibility="hidden";b.position="absolute";b.display="inline";var d;d=a.offsetWidth;a=a.offsetHeight;b.display=c;b.position=f;b.visibility=e;b=new D(d,a)}return b}
-function R(a,b){function c(d){if(P(d,"display")=="none")return false;d=O(d);return!d||c(d)}function e(d){var h=oa(d);if(h.height>0&&h.width>0)return true;if(d.innerText||d.textContent)if(pa.test(d.innerText||d.textContent))return true;return A&&ia(d.childNodes,function(q){return N(q)&&e(q)})}if(!N(a))throw Error("Argument to isShown must be of type Element");if(N(a,"TITLE"))return(E(a)?E(a).parentWindow||E(a).defaultView:window)==ba;if(N(a,"OPTION")||N(a,"OPTGROUP")){var f=G(a,function(d){return N(d,
-"SELECT")});return!!f&&R(f)}if(N(a,"MAP")){if(!a.name)return false;f=E(a);f=f.evaluate?la('/descendant::*[@usemap = "#'+a.name+'"]',f):ka(f,function(d){return N(d)&&na(d,"usemap")=="#"+a.name});return!!f&&R(f)}if(N(a,"AREA")){f=G(a,function(d){return N(d,"MAP")});return!!f&&R(f)}if(N(a,"INPUT")&&a.type.toLowerCase()=="hidden")return false;if(P(a,"visibility")=="hidden")return false;if(!c(a))return false;if(!b&&S(a)==0)return false;if(!e(a))return false;return true}
-var qa="[\\s\\xa0"+String.fromCharCode(160)+"]+",pa=RegExp("^"+qa+"$");function S(a){var b=1,c=P(a,"opacity");if(c)b=Number(c);if(a=O(a))b*=S(a);return b};function ra(a){return R(a,true)};function sa(){}
-function T(a,b,c){switch(typeof b){case "string":U(a,b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==null){c.push("null");break}if(i(b)=="array"){var e=b.length;c.push("[");var f="";for(var d=0;d<e;d++){c.push(f);T(a,b[d],c);f=","}c.push("]");break}c.push("{");e="";for(f in b)if(Object.prototype.hasOwnProperty.call(b,f)){d=b[f];if(typeof d!="function"){c.push(e);U(a,f,c);c.push(":");T(a,
-d,c);e=","}}c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var V={'"':'\\"',"\\":"\\\\","/":"\\/","\u0008":"\\b","\u000c":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\u000b":"\\u000b"},ta=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g;
-function U(a,b,c){c.push('"',b.replace(ta,function(e){if(e in V)return V[e];var f=e.charCodeAt(0),d="\\u";if(f<16)d+="000";else if(f<256)d+="00";else if(f<4096)d+="0";return V[e]=d+f.toString(16)}),'"')};function W(a){switch(i(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return z(a,W);case "object":a=a;if("nodeType"in a&&(a.nodeType==1||a.nodeType==9)){var b={};b.ELEMENT=ua(a);return b}if(j(a))return z(a,W);a=da(a,function(c,e){return typeof e=="number"||k(e)});return o(a,W);default:return null}}
-function X(a,b){if(i(a)=="array")return z(a,function(c){return X(c,b)});else if(aa(a))return"ELEMENT"in a?va(a.ELEMENT,b):o(a,function(c){return X(c,b)});return a}function wa(a){a=a||document;var b=a.$wdc_;if(!b){b=a.$wdc_={};b.e=l()}if(!b.e)b.e=l();return b}function ua(a){var b=wa(a.ownerDocument),c=ea(b,function(e){return e==a});if(!c){c=":wdc:"+b.e++;b[c]=a}return c}
-function va(a,b){a=decodeURIComponent(a);var c=b||document,e=wa(c);if(!(a in e))throw new p(10,"Element does not exist in cache");var f=e[a];for(var d=f;d;){if(d==c.documentElement)return f;d=d.parentNode}delete e[a];throw new p(10,"Element is no longer attached to the DOM");};function xa(a){var b=ra;a=[a];var c;try{if(k(b))b=new Function(b);var e=X(a),f=b.apply(null,e);c={status:0,value:W(f)}}catch(d){c={status:"code"in d?d.code:13,value:{message:d.message}}}b=[];T(new sa,c,b);return b.join("")}var Y="_".split("."),Z=g;!(Y[0]in Z)&&Z.execScript&&Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());)if(!Y.length&&xa!==undefined)Z[$]=xa;else Z=Z[$]?Z[$]:Z[$]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!='undefined'?window.navigator:null}, arguments);}
diff --git a/core/res/res/raw/is_enabled_android.js b/core/res/res/raw/is_enabled_android.js
deleted file mode 100644
index 231309f..0000000
--- a/core/res/res/raw/is_enabled_android.js
+++ /dev/null
@@ -1,12 +0,0 @@
-function(){return function(){function g(a){var b=typeof a;if(b=="object")if(a){if(a instanceof Array)return"array";else if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if(c=="[object Window]")return"object";if(c=="[object Array]"||typeof a.length=="number"&&typeof a.splice!="undefined"&&typeof a.propertyIsEnumerable!="undefined"&&!a.propertyIsEnumerable("splice"))return"array";if(c=="[object Function]"||typeof a.call!="undefined"&&typeof a.propertyIsEnumerable!="undefined"&&!a.propertyIsEnumerable("call"))return"function"}else return"null";
-else if(b=="function"&&typeof a.call=="undefined")return"object";return b}function h(a){var b=g(a);return b=="array"||b=="object"&&typeof a.length=="number"}function i(a){return typeof a=="string"}function k(a){a=g(a);return a=="object"||a=="array"||a=="function"}Math.floor(Math.random()*2147483648).toString(36);var l=Date.now||function(){return+new Date};function m(a,b){function c(){}c.prototype=b.prototype;a.h=b.prototype;a.prototype=new c};function n(a){this.stack=Error().stack||"";if(a)this.message=String(a)}m(n,Error);n.prototype.name="CustomError";function o(a,b,c){var d={};for(var e in a)if(b.call(c,a[e],e,a))d[e]=a[e];return d}function p(a,b,c){var d={};for(var e in a)d[e]=b.call(c,a[e],e,a);return d}function q(a,b,c){for(var d in a)if(b.call(c,a[d],d,a))return d};function r(a,b){n.call(this,b);this.code=a;this.name=s[a]||s[13]}m(r,n);var s,t={NoSuchElementError:7,NoSuchFrameError:8,UnknownCommandError:9,StaleElementReferenceError:10,ElementNotVisibleError:11,InvalidElementStateError:12,UnknownError:13,ElementNotSelectableError:15,XPathLookupError:19,NoSuchWindowError:23,InvalidCookieDomainError:24,UnableToSetCookieError:25,ModalDialogOpenedError:26,ModalDialogOpenError:27,ScriptTimeoutError:28},u={};for(var v in t)u[t[v]]=v;s=u;
-r.prototype.toString=function(){return"["+this.name+"] "+this.message};function w(a){for(var b=1;b<arguments.length;b++){var c=String(arguments[b]).replace(/\$/g,"$$$$");a=a.replace(/\%s/,c)}return a};function x(a,b){b.unshift(a);n.call(this,w.apply(null,b));b.shift();this.i=a}m(x,n);x.prototype.name="AssertionError";function y(a,b){if(!a){var c=Array.prototype.slice.call(arguments,2),d="Assertion failed";if(b){d+=": "+b;var e=c}throw new x(""+d,e||[]);}return a};var z=Array.prototype,A=z.indexOf?function(a,b,c){y(a.length!=null);return z.indexOf.call(a,b,c)}:function(a,b,c){c=c==null?0:c<0?Math.max(0,a.length+c):c;if(i(a)){if(!i(b)||b.length!=1)return-1;return a.indexOf(b,c)}for(c=c;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1},B=z.map?function(a,b,c){y(a.length!=null);return z.map.call(a,b,c)}:function(a,b,c){var d=a.length,e=Array(d),f=i(a)?a.split(""):a;for(var j=0;j<d;j++)if(j in f)e[j]=b.call(c,f[j],j,a);return e};var C="",D;if(D=/WebKit\/(\S+)/){var E=D.exec(this.navigator?this.navigator.userAgent:null);C=E?E[1]:""};var F="StopIteration"in this?this.StopIteration:Error("StopIteration");function G(){}G.prototype.next=function(){throw F;};function H(a,b,c,d,e){this.a=!!b;a&&I(this,a,d);this.d=e!=undefined?e:this.c||0;if(this.a)this.d*=-1;this.f=!c}m(H,G);H.prototype.b=null;H.prototype.c=0;H.prototype.e=false;function I(a,b,c,d){if(a.b=b)a.c=typeof c=="number"?c:a.b.nodeType!=1?0:a.a?-1:1;if(typeof d=="number")a.d=d}
-H.prototype.next=function(){var a;if(this.e){if(!this.b||this.f&&this.d==0)throw F;a=this.b;var b=this.a?-1:1;if(this.c==b){var c=this.a?a.lastChild:a.firstChild;c?I(this,c):I(this,a,b*-1)}else(c=this.a?a.previousSibling:a.nextSibling)?I(this,c):I(this,a.parentNode,b*-1);this.d+=this.c*(this.a?-1:1)}else this.e=true;a=this.b;if(!this.b)throw F;return a};
-H.prototype.splice=function(){var a=this.b,b=this.a?1:-1;if(this.c==b){this.c=b*-1;this.d+=this.c*(this.a?-1:1)}this.a=!this.a;H.prototype.next.call(this);this.a=!this.a;b=h(arguments[0])?arguments[0]:arguments;for(var c=b.length-1;c>=0;c--)a.parentNode&&a.parentNode.insertBefore(b[c],a.nextSibling);a&&a.parentNode&&a.parentNode.removeChild(a)};function J(a,b,c,d){H.call(this,a,b,c,null,d)}m(J,H);J.prototype.next=function(){do J.h.next.call(this);while(this.c==-1);return this.b};var K=["async","autofocus","autoplay","checked","compact","complete","controls","declare","defaultchecked","defaultselected","defer","disabled","draggable","ended","formnovalidate","hidden","indeterminate","iscontenteditable","ismap","itemscope","loop","multiple","muted","nohref","noresize","noshade","novalidate","nowrap","open","paused","pubdate","readonly","required","reversed","scoped","seamless","seeking","selected","spellcheck","truespeed","willvalidate"];
-function L(a,b){if(8==a.nodeType)return null;b=b.toLowerCase();if(b=="style"){var c=a.style.cssText.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").toLowerCase();return c.charAt(c.length-1)==";"?c:c+";"}c=a.getAttributeNode(b);if(!c)return null;if(A(K,b)>=0)return"true";return c.specified?c.value:null}var M=["BUTTON","INPUT","OPTGROUP","OPTION","SELECT","TEXTAREA"];
-function N(a){var b=a.tagName.toUpperCase();if(!(A(M,b)>=0))return true;if(L(a,"disabled"))return false;if(a.parentNode&&a.parentNode.nodeType==1&&"OPTGROUP"==b||"OPTION"==b)return N(a.parentNode);return true}String.fromCharCode(160);function O(){}
-function P(a,b,c){switch(typeof b){case "string":Q(a,b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==null){c.push("null");break}if(g(b)=="array"){var d=b.length;c.push("[");var e="";for(var f=0;f<d;f++){c.push(e);P(a,b[f],c);e=","}c.push("]");break}c.push("{");d="";for(e in b)if(Object.prototype.hasOwnProperty.call(b,e)){f=b[e];if(typeof f!="function"){c.push(d);Q(a,e,c);c.push(":");P(a,
-f,c);d=","}}c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var R={'"':'\\"',"\\":"\\\\","/":"\\/","\u0008":"\\b","\u000c":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\u000b":"\\u000b"},S=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g;
-function Q(a,b,c){c.push('"',b.replace(S,function(d){if(d in R)return R[d];var e=d.charCodeAt(0),f="\\u";if(e<16)f+="000";else if(e<256)f+="00";else if(e<4096)f+="0";return R[d]=f+e.toString(16)}),'"')};function T(a){switch(g(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return B(a,T);case "object":a=a;if("nodeType"in a&&(a.nodeType==1||a.nodeType==9)){var b={};b.ELEMENT=U(a);return b}if(h(a))return B(a,T);a=o(a,function(c,d){return typeof d=="number"||i(d)});return p(a,T);default:return null}}
-function V(a,b){if(g(a)=="array")return B(a,function(c){return V(c,b)});else if(k(a))return"ELEMENT"in a?aa(a.ELEMENT,b):p(a,function(c){return V(c,b)});return a}function W(a){a=a||document;var b=a.$wdc_;if(!b){b=a.$wdc_={};b.g=l()}return b}function U(a){var b=W(a.ownerDocument),c=q(b,function(d){return d==a});if(!c){c=":wdc:"+b.g++;b[c]=a}return c}
-function aa(a,b){a=decodeURIComponent(a);var c=b||document,d=W(c);if(!(a in d))throw new r(10,"Element does not exist in cache");var e=d[a];for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new r(10,"Element is no longer attached to the DOM");};function X(a){var b=N;a=[a];var c;try{if(i(b))b=new Function(b);var d=V(a),e=b.apply(null,d);c={status:0,value:T(e)}}catch(f){c={status:"code"in f?f.code:13,value:{message:f.message}}}b=[];P(new O,c,b);return b.join("")}var Y="_".split("."),Z=this;!(Y[0]in Z)&&Z.execScript&&Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());)if(!Y.length&&X!==undefined)Z[$]=X;else Z=Z[$]?Z[$]:Z[$]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!='undefined'?window.navigator:null}, arguments);}
diff --git a/core/res/res/raw/is_selected_android.js b/core/res/res/raw/is_selected_android.js
deleted file mode 100644
index e1c51b6..0000000
--- a/core/res/res/raw/is_selected_android.js
+++ /dev/null
@@ -1,10 +0,0 @@
-function(){return function(){function g(a){var b=typeof a;if(b=="object")if(a){if(a instanceof Array)return"array";else if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if(c=="[object Window]")return"object";if(c=="[object Array]"||typeof a.length=="number"&&typeof a.splice!="undefined"&&typeof a.propertyIsEnumerable!="undefined"&&!a.propertyIsEnumerable("splice"))return"array";if(c=="[object Function]"||typeof a.call!="undefined"&&typeof a.propertyIsEnumerable!="undefined"&&!a.propertyIsEnumerable("call"))return"function"}else return"null";
-else if(b=="function"&&typeof a.call=="undefined")return"object";return b}function h(a){var b=g(a);return b=="array"||b=="object"&&typeof a.length=="number"}function i(a){return typeof a=="string"}function k(a){a=g(a);return a=="object"||a=="array"||a=="function"}Math.floor(Math.random()*2147483648).toString(36);var l=Date.now||function(){return+new Date};function m(a,b){function c(){}c.prototype=b.prototype;a.h=b.prototype;a.prototype=new c};function n(a){this.stack=Error().stack||"";if(a)this.message=String(a)}m(n,Error);n.prototype.name="CustomError";function o(a,b,c){var d={};for(var e in a)if(b.call(c,a[e],e,a))d[e]=a[e];return d}function p(a,b,c){var d={};for(var e in a)d[e]=b.call(c,a[e],e,a);return d}function q(a,b,c){for(var d in a)if(b.call(c,a[d],d,a))return d};function r(a,b){n.call(this,b);this.code=a;this.name=s[a]||s[13]}m(r,n);var s,t={NoSuchElementError:7,NoSuchFrameError:8,UnknownCommandError:9,StaleElementReferenceError:10,ElementNotVisibleError:11,InvalidElementStateError:12,UnknownError:13,ElementNotSelectableError:15,XPathLookupError:19,NoSuchWindowError:23,InvalidCookieDomainError:24,UnableToSetCookieError:25,ModalDialogOpenedError:26,ModalDialogOpenError:27,ScriptTimeoutError:28},u={};for(var v in t)u[t[v]]=v;s=u;
-r.prototype.toString=function(){return"["+this.name+"] "+this.message};function w(a){for(var b=1;b<arguments.length;b++){var c=String(arguments[b]).replace(/\$/g,"$$$$");a=a.replace(/\%s/,c)}return a};function x(a,b){b.unshift(a);n.call(this,w.apply(null,b));b.shift();this.i=a}m(x,n);x.prototype.name="AssertionError";function y(a,b){if(!a){var c=Array.prototype.slice.call(arguments,2),d="Assertion failed";if(b){d+=": "+b;var e=c}throw new x(""+d,e||[]);}return a};var z=Array.prototype,A=z.indexOf?function(a,b,c){y(a.length!=null);return z.indexOf.call(a,b,c)}:function(a,b,c){c=c==null?0:c<0?Math.max(0,a.length+c):c;if(i(a)){if(!i(b)||b.length!=1)return-1;return a.indexOf(b,c)}for(c=c;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1},B=z.map?function(a,b,c){y(a.length!=null);return z.map.call(a,b,c)}:function(a,b,c){var d=a.length,e=Array(d),f=i(a)?a.split(""):a;for(var j=0;j<d;j++)if(j in f)e[j]=b.call(c,f[j],j,a);return e};var C="",D;if(D=/WebKit\/(\S+)/){var E=D.exec(this.navigator?this.navigator.userAgent:null);C=E?E[1]:""};var F="StopIteration"in this?this.StopIteration:Error("StopIteration");function G(){}G.prototype.next=function(){throw F;};function H(a,b,c,d,e){this.a=!!b;a&&I(this,a,d);this.d=e!=undefined?e:this.c||0;if(this.a)this.d*=-1;this.f=!c}m(H,G);H.prototype.b=null;H.prototype.c=0;H.prototype.e=false;function I(a,b,c,d){if(a.b=b)a.c=typeof c=="number"?c:a.b.nodeType!=1?0:a.a?-1:1;if(typeof d=="number")a.d=d}
-H.prototype.next=function(){var a;if(this.e){if(!this.b||this.f&&this.d==0)throw F;a=this.b;var b=this.a?-1:1;if(this.c==b){var c=this.a?a.lastChild:a.firstChild;c?I(this,c):I(this,a,b*-1)}else(c=this.a?a.previousSibling:a.nextSibling)?I(this,c):I(this,a.parentNode,b*-1);this.d+=this.c*(this.a?-1:1)}else this.e=true;a=this.b;if(!this.b)throw F;return a};
-H.prototype.splice=function(){var a=this.b,b=this.a?1:-1;if(this.c==b){this.c=b*-1;this.d+=this.c*(this.a?-1:1)}this.a=!this.a;H.prototype.next.call(this);this.a=!this.a;b=h(arguments[0])?arguments[0]:arguments;for(var c=b.length-1;c>=0;c--)a.parentNode&&a.parentNode.insertBefore(b[c],a.nextSibling);a&&a.parentNode&&a.parentNode.removeChild(a)};function J(a,b,c,d){H.call(this,a,b,c,null,d)}m(J,H);J.prototype.next=function(){do J.h.next.call(this);while(this.c==-1);return this.b};var K={"class":"className",readonly:"readOnly"},L=["checked","disabled","draggable","hidden"];String.fromCharCode(160);function M(a){var b;if(a&&a.nodeType==1&&a.tagName.toUpperCase()=="OPTION")b=true;else if(a&&a.nodeType==1&&a.tagName.toUpperCase()=="INPUT"){b=a.type.toLowerCase();b=b=="checkbox"||b=="radio"}else b=false;if(!b)throw new r(15,"Element is not selectable");b="selected";var c=a.type&&a.type.toLowerCase();if("checkbox"==c||"radio"==c)b="checked";b=K[b]||b;a=a[b];a=a===undefined&&A(L,b)>=0?false:a;return!!a};function N(){}
-function O(a,b,c){switch(typeof b){case "string":P(a,b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==null){c.push("null");break}if(g(b)=="array"){var d=b.length;c.push("[");var e="";for(var f=0;f<d;f++){c.push(e);O(a,b[f],c);e=","}c.push("]");break}c.push("{");d="";for(e in b)if(Object.prototype.hasOwnProperty.call(b,e)){f=b[e];if(typeof f!="function"){c.push(d);P(a,e,c);c.push(":");O(a,
-f,c);d=","}}c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var Q={'"':'\\"',"\\":"\\\\","/":"\\/","\u0008":"\\b","\u000c":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\u000b":"\\u000b"},R=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g;
-function P(a,b,c){c.push('"',b.replace(R,function(d){if(d in Q)return Q[d];var e=d.charCodeAt(0),f="\\u";if(e<16)f+="000";else if(e<256)f+="00";else if(e<4096)f+="0";return Q[d]=f+e.toString(16)}),'"')};function S(a){switch(g(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return B(a,S);case "object":a=a;if("nodeType"in a&&(a.nodeType==1||a.nodeType==9)){var b={};b.ELEMENT=T(a);return b}if(h(a))return B(a,S);a=o(a,function(c,d){return typeof d=="number"||i(d)});return p(a,S);default:return null}}
-function U(a,b){if(g(a)=="array")return B(a,function(c){return U(c,b)});else if(k(a))return"ELEMENT"in a?V(a.ELEMENT,b):p(a,function(c){return U(c,b)});return a}function W(a){a=a||document;var b=a.$wdc_;if(!b){b=a.$wdc_={};b.g=l()}return b}function T(a){var b=W(a.ownerDocument),c=q(b,function(d){return d==a});if(!c){c=":wdc:"+b.g++;b[c]=a}return c}
-function V(a,b){a=decodeURIComponent(a);var c=b||document,d=W(c);if(!(a in d))throw new r(10,"Element does not exist in cache");var e=d[a];for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new r(10,"Element is no longer attached to the DOM");};function X(a){var b=M;a=[a];var c;try{if(i(b))b=new Function(b);var d=U(a),e=b.apply(null,d);c={status:0,value:S(e)}}catch(f){c={status:"code"in f?f.code:13,value:{message:f.message}}}b=[];O(new N,c,b);return b.join("")}var Y="_".split("."),Z=this;!(Y[0]in Z)&&Z.execScript&&Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());)if(!Y.length&&X!==undefined)Z[$]=X;else Z=Z[$]?Z[$]:Z[$]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!='undefined'?window.navigator:null}, arguments);}
diff --git a/core/res/res/raw/set_selected_android.js b/core/res/res/raw/set_selected_android.js
deleted file mode 100644
index 8936f55..0000000
--- a/core/res/res/raw/set_selected_android.js
+++ /dev/null
@@ -1,27 +0,0 @@
-function(){return function(){var l=this;
-function m(a){var b=typeof a;if(b=="object")if(a){if(a instanceof Array)return"array";else if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if(c=="[object Window]")return"object";if(c=="[object Array]"||typeof a.length=="number"&&typeof a.splice!="undefined"&&typeof a.propertyIsEnumerable!="undefined"&&!a.propertyIsEnumerable("splice"))return"array";if(c=="[object Function]"||typeof a.call!="undefined"&&typeof a.propertyIsEnumerable!="undefined"&&!a.propertyIsEnumerable("call"))return"function"}else return"null";else if(b==
-"function"&&typeof a.call=="undefined")return"object";return b}function o(a){var b=m(a);return b=="array"||b=="object"&&typeof a.length=="number"}function p(a){return typeof a=="string"}function q(a){a=m(a);return a=="object"||a=="array"||a=="function"}Math.floor(Math.random()*2147483648).toString(36);var aa=Date.now||function(){return+new Date};function r(a,b){function c(){}c.prototype=b.prototype;a.k=b.prototype;a.prototype=new c};var ba=window;function ca(){var a=l.Components;if(!a)return false;try{a.l["@mozilla.org/uuid-generator;1"].o(a.i.r);return true}catch(b){return false}};function s(a){this.stack=Error().stack||"";if(a)this.message=String(a)}r(s,Error);s.prototype.name="CustomError";function da(a,b,c){var d={};for(var f in a)if(b.call(c,a[f],f,a))d[f]=a[f];return d}function t(a,b,c){var d={};for(var f in a)d[f]=b.call(c,a[f],f,a);return d}function ea(a,b,c){for(var d in a)if(b.call(c,a[d],d,a))return d};function v(a,b){s.call(this,b);this.code=a;this.name=w[a]||w[13]}r(v,s);var w,fa={NoSuchElementError:7,NoSuchFrameError:8,UnknownCommandError:9,StaleElementReferenceError:10,ElementNotVisibleError:11,InvalidElementStateError:12,UnknownError:13,ElementNotSelectableError:15,XPathLookupError:19,NoSuchWindowError:23,InvalidCookieDomainError:24,UnableToSetCookieError:25,ModalDialogOpenedError:26,ModalDialogOpenError:27,ScriptTimeoutError:28},ga={};for(var ha in fa)ga[fa[ha]]=ha;w=ga;
-v.prototype.toString=function(){return"["+this.name+"] "+this.message};function ia(a){for(var b=1;b<arguments.length;b++){var c=String(arguments[b]).replace(/\$/g,"$$$$");a=a.replace(/\%s/,c)}return a}var ja={};function ka(a){return ja[a]||(ja[a]=String(a).replace(/\-([a-z])/g,function(b,c){return c.toUpperCase()}))};function x(a,b){b.unshift(a);s.call(this,ia.apply(null,b));b.shift();this.p=a}r(x,s);x.prototype.name="AssertionError";function y(a,b){if(!a){var c=Array.prototype.slice.call(arguments,2),d="Assertion failed";if(b){d+=": "+b;var f=c}throw new x(""+d,f||[]);}return a};var z=Array.prototype,A=z.indexOf?function(a,b,c){y(a.length!=null);return z.indexOf.call(a,b,c)}:function(a,b,c){c=c==null?0:c<0?Math.max(0,a.length+c):c;if(p(a)){if(!p(b)||b.length!=1)return-1;return a.indexOf(b,c)}for(c=c;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1},B=z.map?function(a,b,c){y(a.length!=null);return z.map.call(a,b,c)}:function(a,b,c){var d=a.length,f=Array(d),e=p(a)?a.split(""):a;for(var g=0;g<d;g++)if(g in e)f[g]=b.call(c,e[g],g,a);return f},la=z.some?function(a,b,c){y(a.length!=
-null);return z.some.call(a,b,c)}:function(a,b,c){var d=a.length,f=p(a)?a.split(""):a;for(var e=0;e<d;e++)if(e in f&&b.call(c,f[e],e,a))return true;return false};var C=true,ma="",D;if(C)D=/WebKit\/(\S+)/;if(D){var na=D.exec(l.navigator?l.navigator.userAgent:null);ma=na?na[1]:""};var E;function F(a,b){this.x=a!==undefined?a:0;this.y=b!==undefined?b:0}F.prototype.toString=function(){return"("+this.x+", "+this.y+")"};function G(a,b){this.width=a;this.height=b}G.prototype.toString=function(){return"("+this.width+" x "+this.height+")"};G.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};function H(a){return a.nodeType==9?a:a.ownerDocument||a.document}function oa(a,b){var c=[];return pa(a,b,c,true)?c[0]:undefined}function pa(a,b,c,d){if(a!=null){var f=0;for(var e;e=a.childNodes[f];f++){if(b(e)){c.push(e);if(d)return true}if(pa(e,b,c,d))return true}}return false}function I(a,b,c,d){if(!c)a=a.parentNode;c=d==null;for(var f=0;a&&(c||f<=d);){if(b(a))return a;a=a.parentNode;f++}return null}function J(a){this.e=a||l.document||document}
-function qa(a){a=!C&&a.e.compatMode=="CSS1Compat"?a.e.documentElement:a.e.body;return new F(a.scrollLeft,a.scrollTop)};function ra(a,b){var c=function(d,f){var e=H(d);if(d.selectSingleNode){e.setProperty&&e.setProperty("SelectionLanguage","XPath");return d.selectSingleNode(f)}else if(e.implementation.hasFeature("XPath","3.0")){var g=e.createNSResolver(e.documentElement),h;if(typeof XPathResult!="undefined")h=XPathResult.FIRST_ORDERED_NODE_TYPE;else{if(!ca())throw Error("Document claims it supports XPath yet XPathResult is not defined. Please report this to Selenium developers");h=Components.i.q.FIRST_ORDERED_NODE_TYPE}return e.evaluate(f,
-d,g,h,null).singleNodeValue}return null}(b,a);if(!c)return null;if(c.nodeType!=1)throw Error("Returned node is not an element: "+a);return c};var K="StopIteration"in l?l.StopIteration:Error("StopIteration");function sa(){}sa.prototype.next=function(){throw K;};function L(a,b,c,d,f){this.a=!!b;a&&M(this,a,d);this.d=f!=undefined?f:this.c||0;if(this.a)this.d*=-1;this.h=!c}r(L,sa);L.prototype.b=null;L.prototype.c=0;L.prototype.g=false;function M(a,b,c,d){if(a.b=b)a.c=typeof c=="number"?c:a.b.nodeType!=1?0:a.a?-1:1;if(typeof d=="number")a.d=d}
-L.prototype.next=function(){var a;if(this.g){if(!this.b||this.h&&this.d==0)throw K;a=this.b;var b=this.a?-1:1;if(this.c==b){var c=this.a?a.lastChild:a.firstChild;c?M(this,c):M(this,a,b*-1)}else(c=this.a?a.previousSibling:a.nextSibling)?M(this,c):M(this,a.parentNode,b*-1);this.d+=this.c*(this.a?-1:1)}else this.g=true;a=this.b;if(!this.b)throw K;return a};
-L.prototype.splice=function(){var a=this.b,b=this.a?1:-1;if(this.c==b){this.c=b*-1;this.d+=this.c*(this.a?-1:1)}this.a=!this.a;L.prototype.next.call(this);this.a=!this.a;b=o(arguments[0])?arguments[0]:arguments;for(var c=b.length-1;c>=0;c--)a.parentNode&&a.parentNode.insertBefore(b[c],a.nextSibling);a&&a.parentNode&&a.parentNode.removeChild(a)};function N(a,b,c,d){L.call(this,a,b,c,null,d)}r(N,L);N.prototype.next=function(){do N.k.next.call(this);while(this.c==-1);return this.b};function ta(a,b){var c=H(a);if(c.defaultView&&c.defaultView.getComputedStyle)if(c=c.defaultView.getComputedStyle(a,null))return c[b]||c.getPropertyValue(b);return""}function O(a,b){return ta(a,b)||(a.currentStyle?a.currentStyle[b]:null)||a.style[b]}
-function ua(a){var b=H(a),c=O(a,"position"),d=c=="fixed"||c=="absolute";for(a=a.parentNode;a&&a!=b;a=a.parentNode){c=O(a,"position");d=d&&c=="static"&&a!=b.documentElement&&a!=b.body;if(!d&&(a.scrollWidth>a.clientWidth||a.scrollHeight>a.clientHeight||c=="fixed"||c=="absolute"))return a}return null};function P(a,b){return!!a&&a.nodeType==1&&(!b||a.tagName.toUpperCase()==b)}
-var va={"class":"className",readonly:"readOnly"},wa=["checked","disabled","draggable","hidden"],xa=["async","autofocus","autoplay","checked","compact","complete","controls","declare","defaultchecked","defaultselected","defer","disabled","draggable","ended","formnovalidate","hidden","indeterminate","iscontenteditable","ismap","itemscope","loop","multiple","muted","nohref","noresize","noshade","novalidate","nowrap","open","paused","pubdate","readonly","required","reversed","scoped","seamless","seeking",
-"selected","spellcheck","truespeed","willvalidate"];function ya(a,b){if(8==a.nodeType)return null;b=b.toLowerCase();if(b=="style"){var c=a.style.cssText.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").toLowerCase();return c.charAt(c.length-1)==";"?c:c+";"}c=a.getAttributeNode(b);if(!c)return null;if(A(xa,b)>=0)return"true";return c.specified?c.value:null}var za=["BUTTON","INPUT","OPTGROUP","OPTION","SELECT","TEXTAREA"];
-function Aa(a){var b=a.tagName.toUpperCase();if(!(A(za,b)>=0))return true;if(ya(a,"disabled"))return false;if(a.parentNode&&a.parentNode.nodeType==1&&"OPTGROUP"==b||"OPTION"==b)return Aa(a.parentNode);return true}function Q(a){for(a=a.parentNode;a&&a.nodeType!=1&&a.nodeType!=9&&a.nodeType!=11;)a=a.parentNode;return P(a)?a:null}function R(a,b){b=ka(String(b));return ta(a,b)||Ba(a,b)}
-function Ba(a,b){var c=(a.currentStyle||a.style)[b];if(c!="inherit")return c!==undefined?c:null;return(c=Q(a))?Ba(c,b):null}function Ca(a){if(m(a.getBBox)=="function")return a.getBBox();var b;if(O(a,"display")!="none")b=new G(a.offsetWidth,a.offsetHeight);else{b=a.style;var c=b.display,d=b.visibility,f=b.position;b.visibility="hidden";b.position="absolute";b.display="inline";var e;e=a.offsetWidth;a=a.offsetHeight;b.display=c;b.position=f;b.visibility=d;b=new G(e,a)}return b}
-function S(a,b){function c(e){if(R(e,"display")=="none")return false;e=Q(e);return!e||c(e)}function d(e){var g=Ca(e);if(g.height>0&&g.width>0)return true;if(e.innerText||e.textContent)if(Da.test(e.innerText||e.textContent))return true;return C&&la(e.childNodes,function(h){return P(h)&&d(h)})}if(!P(a))throw Error("Argument to isShown must be of type Element");if(P(a,"TITLE"))return(H(a)?H(a).parentWindow||H(a).defaultView:window)==ba;if(P(a,"OPTION")||P(a,"OPTGROUP")){var f=I(a,function(e){return P(e,
-"SELECT")});return!!f&&S(f)}if(P(a,"MAP")){if(!a.name)return false;f=H(a);f=f.evaluate?ra('/descendant::*[@usemap = "#'+a.name+'"]',f):oa(f,function(e){return P(e)&&ya(e,"usemap")=="#"+a.name});return!!f&&S(f)}if(P(a,"AREA")){f=I(a,function(e){return P(e,"MAP")});return!!f&&S(f)}if(P(a,"INPUT")&&a.type.toLowerCase()=="hidden")return false;if(R(a,"visibility")=="hidden")return false;if(!c(a))return false;if(!b&&Ea(a)==0)return false;if(!d(a))return false;return true}
-var Fa="[\\s\\xa0"+String.fromCharCode(160)+"]+",Da=RegExp("^"+Fa+"$");function Ea(a){var b=1,c=R(a,"opacity");if(c)b=Number(c);if(a=Q(a))b*=Ea(a);return b};var Ga=["dragstart","dragexit","mouseover","mouseout"];
-function T(a,b,c){var d=H(a),f=d?d.parentWindow||d.defaultView:window,e=new F;if(a.nodeType==1)if(a.getBoundingClientRect){var g=a.getBoundingClientRect();e.x=g.left;e.y=g.top}else{g=qa(a?new J(H(a)):E||(E=new J));var h,i=H(a);h=O(a,"position");var j=new F(0,0),u=(i?i.nodeType==9?i:H(i):document).documentElement;if(a!=u)if(a.getBoundingClientRect){h=a.getBoundingClientRect();i=qa(i?new J(H(i)):E||(E=new J));j.x=h.left+i.x;j.y=h.top+i.y}else if(i.getBoxObjectFor){h=i.getBoxObjectFor(a);i=i.getBoxObjectFor(u);
-j.x=h.screenX-i.screenX;j.y=h.screenY-i.screenY}else{var k=a;do{j.x+=k.offsetLeft;j.y+=k.offsetTop;if(k!=a){j.x+=k.clientLeft||0;j.y+=k.clientTop||0}if(C&&O(k,"position")=="fixed"){j.x+=i.body.scrollLeft;j.y+=i.body.scrollTop;break}k=k.offsetParent}while(k&&k!=a);if(C&&h=="absolute")j.y-=i.body.offsetTop;for(k=a;(k=ua(k))&&k!=i.body&&k!=u;){j.x-=k.scrollLeft;j.y-=k.scrollTop}}e.x=j.x-g.x;e.y=j.y-g.y}else{g=m(a.f)=="function";j=a;if(a.targetTouches)j=a.targetTouches[0];else if(g&&a.f().targetTouches)j=
-a.f().targetTouches[0];e.x=j.clientX;e.y=j.clientY}var n=c||{};c=(n.x||0)+e.x;e=(n.y||0)+e.y;g=n.button||0;j=n.bubble||true;h=null;if(A(Ga,b)>=0)h=n.related||null;i=!!n.alt;u=!!n.control;k=!!n.shift;n=!!n.meta;if(a.fireEvent&&d&&d.createEventObject){a=d.createEventObject();a.altKey=i;a.m=u;a.metaKey=n;a.shiftKey=k;a.clientX=c;a.clientY=e;a.button=g;a.relatedTarget=h}else{a=d.createEvent("MouseEvents");if(a.initMouseEvent)a.initMouseEvent(b,j,true,f,1,0,0,c,e,u,i,k,n,g,h);else{a.initEvent(b,j,true);
-a.shiftKey=k;a.metaKey=n;a.altKey=i;a.ctrlKey=u;a.button=g}}return a}function U(a,b,c){var d=c||{};c=d.keyCode||0;var f=d.charCode||0,e=!!d.alt,g=!!d.ctrl,h=!!d.shift;d=!!d.meta;a=H(a).createEvent("Events");a.initEvent(b,true,true);a.charCode=f;a.keyCode=c;a.altKey=e;a.ctrlKey=g;a.metaKey=d;a.shiftKey=h;return a}
-function Ha(a,b,c){var d=H(a),f=c||{};c=f.bubble!==false;var e=!!f.alt,g=!!f.control,h=!!f.shift;f=!!f.meta;if(a.fireEvent&&d&&d.createEventObject){a=d.createEventObject();a.altKey=e;a.n=g;a.metaKey=f;a.shiftKey=h}else{a=d.createEvent("HTMLEvents");a.initEvent(b,c,true);a.shiftKey=h;a.metaKey=f;a.altKey=e;a.ctrlKey=g}return a}var V={};V.click=T;V.keydown=U;V.keypress=U;V.keyup=U;V.mousedown=T;V.mousemove=T;V.mouseout=T;V.mouseover=T;V.mouseup=T;
-function Ia(a,b,c){c=(V[b]||Ha)(a,b,c);if(m(a.fireEvent)=="function"||q(a.fireEvent)){try{(H(a)?H(a).parentWindow||H(a).defaultView:window).event=c}catch(d){}a=a.fireEvent("on"+b,c)}else a=a.dispatchEvent(c);return a};function Ja(a){var b;if(P(a,"OPTION"))b=true;else if(P(a,"INPUT")){b=a.type.toLowerCase();b=b=="checkbox"||b=="radio"}else b=false;if(!b)throw new v(15,"Element is not selectable");b="selected";var c=a.type&&a.type.toLowerCase();if("checkbox"==c||"radio"==c)b="checked";b=va[b]||b;a=a[b];a=a===undefined&&A(wa,b)>=0?false:a;return!!a}function Ka(a){return P(a,"SELECT")}
-function La(a,b){if(!Aa(a))throw new v(12,"Element is not currently enabled and may not be manipulated");if(!S(a,true))throw new v(11,"Element is not currently visible and may not be manipulated");if(P(a,"INPUT")){var c=a.type.toLowerCase();if(c=="checkbox"||c=="radio"){if(a.checked!=b){if(a.type=="radio"&&!b)throw new v(12,"You may not deselect a radio button");if(b!=Ja(a)){a.checked=b;Ia(a,"change")}}}else throw new v(15,"You may not select an unselectable input element: "+a.type);}else if(P(a,
-"OPTION")){c=I(a,Ka);if(!c.multiple&&!b)throw new v(15,"You may not deselect an option within a select that does not support multiple selections.");if(b!=Ja(a)){a.selected=b;Ia(c,"change")}}else throw new v(15,"You may not select an unselectable element: "+a.tagName);};function W(a){switch(m(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return B(a,W);case "object":a=a;if("nodeType"in a&&(a.nodeType==1||a.nodeType==9)){var b={};b.ELEMENT=Ma(a);return b}if(o(a))return B(a,W);a=da(a,function(c,d){return typeof d=="number"||p(d)});return t(a,W);default:return null}}
-function X(a,b){if(m(a)=="array")return B(a,function(c){return X(c,b)});else if(q(a))return"ELEMENT"in a?Na(a.ELEMENT,b):t(a,function(c){return X(c,b)});return a}function Oa(a){a=a||document;var b=a.$wdc_;if(!b){b=a.$wdc_={};b.j=aa()}return b}function Ma(a){var b=Oa(a.ownerDocument),c=ea(b,function(d){return d==a});if(!c){c=":wdc:"+b.j++;b[c]=a}return c}
-function Na(a,b){a=decodeURIComponent(a);var c=b||document,d=Oa(c);if(!(a in d))throw new v(10,"Element does not exist in cache");var f=d[a];for(var e=f;e;){if(e==c.documentElement)return f;e=e.parentNode}delete d[a];throw new v(10,"Element is no longer attached to the DOM");};function Pa(a,b){var c=La,d=[a,b];try{if(p(c))c=new Function(c);var f=X(d),e=c.apply(null,f);W(e)}catch(g){}}var Y="_".split("."),Z=l;!(Y[0]in Z)&&Z.execScript&&Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());)if(!Y.length&&Pa!==undefined)Z[$]=Pa;else Z=Z[$]?Z[$]:Z[$]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!='undefined'?window.navigator:null}, arguments);}
diff --git a/core/res/res/raw/submit_android.js b/core/res/res/raw/submit_android.js
deleted file mode 100644
index 8dd2e3b..0000000
--- a/core/res/res/raw/submit_android.js
+++ /dev/null
@@ -1,29 +0,0 @@
-function(){return function(){var m,o=this;function p(){}
-function r(a){var b=typeof a;if(b=="object")if(a){if(a instanceof Array)return"array";else if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if(c=="[object Window]")return"object";if(c=="[object Array]"||typeof a.length=="number"&&typeof a.splice!="undefined"&&typeof a.propertyIsEnumerable!="undefined"&&!a.propertyIsEnumerable("splice"))return"array";if(c=="[object Function]"||typeof a.call!="undefined"&&typeof a.propertyIsEnumerable!="undefined"&&!a.propertyIsEnumerable("call"))return"function"}else return"null";
-else if(b=="function"&&typeof a.call=="undefined")return"object";return b}function aa(a){var b=r(a);return b=="array"||b=="object"&&typeof a.length=="number"}function s(a){return typeof a=="string"}function t(a){return r(a)=="function"}function u(a){a=r(a);return a=="object"||a=="array"||a=="function"}function v(a){return a[ba]||(a[ba]=++ca)}var ba="closure_uid_"+Math.floor(Math.random()*2147483648).toString(36),ca=0,da=Date.now||function(){return+new Date};
-function w(a,b){function c(){}c.prototype=b.prototype;a.r=b.prototype;a.prototype=new c};function x(a){this.stack=Error().stack||"";if(a)this.message=String(a)}w(x,Error);x.prototype.name="CustomError";function ea(a,b,c){var d={};for(var f in a)if(b.call(c,a[f],f,a))d[f]=a[f];return d}function fa(a,b,c){var d={};for(var f in a)d[f]=b.call(c,a[f],f,a);return d}function ga(a,b,c){for(var d in a)if(b.call(c,a[d],d,a))return d};function y(a,b){x.call(this,b);this.code=a;this.name=z[a]||z[13]}w(y,x);var z,ha={NoSuchElementError:7,NoSuchFrameError:8,UnknownCommandError:9,StaleElementReferenceError:10,ElementNotVisibleError:11,InvalidElementStateError:12,UnknownError:13,ElementNotSelectableError:15,XPathLookupError:19,NoSuchWindowError:23,InvalidCookieDomainError:24,UnableToSetCookieError:25,ModalDialogOpenedError:26,ModalDialogOpenError:27,ScriptTimeoutError:28},ia={};for(var ja in ha)ia[ha[ja]]=ja;z=ia;
-y.prototype.toString=function(){return"["+this.name+"] "+this.message};function ka(a){for(var b=1;b<arguments.length;b++){var c=String(arguments[b]).replace(/\$/g,"$$$$");a=a.replace(/\%s/,c)}return a}
-function la(a,b){var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=Math.max(d.length,f.length);for(var g=0;c==0&&g<e;g++){var j=d[g]||"",i=f[g]||"",h=RegExp("(\\d*)(\\D*)","g"),n=RegExp("(\\d*)(\\D*)","g");do{var k=h.exec(j)||["","",""],l=n.exec(i)||["","",""];if(k[0].length==0&&l[0].length==0)break;c=A(k[1].length==0?0:parseInt(k[1],10),l[1].length==0?0:parseInt(l[1],10))||A(k[2].length==0,l[2].length==0)||A(k[2],l[2])}while(c==
-0)}return c}function A(a,b){if(a<b)return-1;else if(a>b)return 1;return 0};function B(a,b){b.unshift(a);x.call(this,ka.apply(null,b));b.shift();this.N=a}w(B,x);B.prototype.name="AssertionError";function C(a,b){if(!a){var c=Array.prototype.slice.call(arguments,2),d="Assertion failed";if(b){d+=": "+b;var f=c}throw new B(""+d,f||[]);}return a};var D=Array.prototype,ma=D.indexOf?function(a,b,c){C(a.length!=null);return D.indexOf.call(a,b,c)}:function(a,b,c){c=c==null?0:c<0?Math.max(0,a.length+c):c;if(s(a)){if(!s(b)||b.length!=1)return-1;return a.indexOf(b,c)}for(c=c;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1},na=D.map?function(a,b,c){C(a.length!=null);return D.map.call(a,b,c)}:function(a,b,c){var d=a.length,f=Array(d),e=s(a)?a.split(""):a;for(var g=0;g<d;g++)if(g in e)f[g]=b.call(c,e[g],g,a);return f};var oa=o.navigator,pa=(oa&&oa.platform||"").indexOf("Mac")!=-1,qa="",ra;if(ra=/WebKit\/(\S+)/){var sa=ra.exec(o.navigator?o.navigator.userAgent:null);qa=sa?sa[1]:""};var E;function F(a,b){this.x=a!==undefined?a:0;this.y=b!==undefined?b:0}F.prototype.toString=function(){return"("+this.x+", "+this.y+")"};function G(a){return a.nodeType==9?a:a.ownerDocument||a.document}function H(a){this.D=a||o.document||document}function ta(a){a=a.D.body;return new F(a.scrollLeft,a.scrollTop)};var ua="StopIteration"in o?o.StopIteration:Error("StopIteration");function va(){}va.prototype.next=function(){throw ua;};function I(a,b,c,d,f){this.a=!!b;a&&J(this,a,d);this.h=f!=undefined?f:this.d||0;if(this.a)this.h*=-1;this.C=!c}w(I,va);m=I.prototype;m.c=null;m.d=0;m.B=false;function J(a,b,c,d){if(a.c=b)a.d=typeof c=="number"?c:a.c.nodeType!=1?0:a.a?-1:1;if(typeof d=="number")a.h=d}
-m.next=function(){var a;if(this.B){if(!this.c||this.C&&this.h==0)throw ua;a=this.c;var b=this.a?-1:1;if(this.d==b){var c=this.a?a.lastChild:a.firstChild;c?J(this,c):J(this,a,b*-1)}else(c=this.a?a.previousSibling:a.nextSibling)?J(this,c):J(this,a.parentNode,b*-1);this.h+=this.d*(this.a?-1:1)}else this.B=true;a=this.c;if(!this.c)throw ua;return a};
-m.splice=function(){var a=this.c,b=this.a?1:-1;if(this.d==b){this.d=b*-1;this.h+=this.d*(this.a?-1:1)}this.a=!this.a;I.prototype.next.call(this);this.a=!this.a;b=aa(arguments[0])?arguments[0]:arguments;for(var c=b.length-1;c>=0;c--)a.parentNode&&a.parentNode.insertBefore(b[c],a.nextSibling);a&&a.parentNode&&a.parentNode.removeChild(a)};function wa(a,b,c,d){I.call(this,a,b,c,null,d)}w(wa,I);wa.prototype.next=function(){do wa.r.next.call(this);while(this.d==-1);return this.c};function K(a,b){var c;a:{c=G(a);if(c.defaultView&&c.defaultView.getComputedStyle)if(c=c.defaultView.getComputedStyle(a,null)){c=c[b]||c.getPropertyValue(b);break a}c=""}return c||(a.currentStyle?a.currentStyle[b]:null)||a.style[b]}
-function xa(a){var b=G(a),c=K(a,"position"),d=c=="fixed"||c=="absolute";for(a=a.parentNode;a&&a!=b;a=a.parentNode){c=K(a,"position");d=d&&c=="static"&&a!=b.documentElement&&a!=b.body;if(!d&&(a.scrollWidth>a.clientWidth||a.scrollHeight>a.clientHeight||c=="fixed"||c=="absolute"))return a}return null};String.fromCharCode(160);var ya;var za=["dragstart","dragexit","mouseover","mouseout"];
-function L(a,b,c){var d=G(a),f=d?d.parentWindow||d.defaultView:window,e=new F;if(a.nodeType==1)if(a.getBoundingClientRect){var g=a.getBoundingClientRect();e.x=g.left;e.y=g.top}else{g=ta(a?new H(G(a)):E||(E=new H));var j,i=G(a);j=K(a,"position");var h=new F(0,0),n=(i?i.nodeType==9?i:G(i):document).documentElement;if(a!=n)if(a.getBoundingClientRect){j=a.getBoundingClientRect();i=ta(i?new H(G(i)):E||(E=new H));h.x=j.left+i.x;h.y=j.top+i.y}else if(i.getBoxObjectFor){j=i.getBoxObjectFor(a);i=i.getBoxObjectFor(n);
-h.x=j.screenX-i.screenX;h.y=j.screenY-i.screenY}else{var k=a;do{h.x+=k.offsetLeft;h.y+=k.offsetTop;if(k!=a){h.x+=k.clientLeft||0;h.y+=k.clientTop||0}if(K(k,"position")=="fixed"){h.x+=i.body.scrollLeft;h.y+=i.body.scrollTop;break}k=k.offsetParent}while(k&&k!=a);if(j=="absolute")h.y-=i.body.offsetTop;for(k=a;(k=xa(k))&&k!=i.body&&k!=n;){h.x-=k.scrollLeft;h.y-=k.scrollTop}}e.x=h.x-g.x;e.y=h.y-g.y}else{g=t(a.F);h=a;if(a.targetTouches)h=a.targetTouches[0];else if(g&&a.i.targetTouches)h=a.i.targetTouches[0];
-e.x=h.clientX;e.y=h.clientY}var l=c||{};c=(l.x||0)+e.x;e=(l.y||0)+e.y;g=l.button||0;h=l.bubble||true;j=null;if(ma(za,b)>=0)j=l.related||null;i=!!l.alt;n=!!l.control;k=!!l.shift;l=!!l.meta;if(a.fireEvent&&d&&d.createEventObject){a=d.createEventObject();a.altKey=i;a.K=n;a.metaKey=l;a.shiftKey=k;a.clientX=c;a.clientY=e;a.button=g;a.relatedTarget=j}else{a=d.createEvent("MouseEvents");if(a.initMouseEvent)a.initMouseEvent(b,h,true,f,1,0,0,c,e,n,i,k,l,g,j);else{a.initEvent(b,h,true);a.shiftKey=k;a.metaKey=
-l;a.altKey=i;a.ctrlKey=n;a.button=g}}return a}function Aa(a,b,c){var d=c||{};c=d.keyCode||0;var f=d.charCode||0,e=!!d.alt,g=!!d.ctrl,j=!!d.shift;d=!!d.meta;a=G(a).createEvent("Events");a.initEvent(b,true,true);a.charCode=f;a.keyCode=c;a.altKey=e;a.ctrlKey=g;a.metaKey=d;a.shiftKey=j;return a}
-function Ba(a,b,c){var d=G(a),f=c||{};c=f.bubble!==false;var e=!!f.alt,g=!!f.control,j=!!f.shift;f=!!f.meta;if(a.fireEvent&&d&&d.createEventObject){a=d.createEventObject();a.altKey=e;a.L=g;a.metaKey=f;a.shiftKey=j}else{a=d.createEvent("HTMLEvents");a.initEvent(b,c,true);a.shiftKey=j;a.metaKey=f;a.altKey=e;a.ctrlKey=g}return a}var M={};M.click=L;M.keydown=Aa;M.keypress=Aa;M.keyup=Aa;M.mousedown=L;M.mousemove=L;M.mouseout=L;M.mouseover=L;M.mouseup=L;function Ca(a){a:{a=a;for(var b=0;a;){if(a&&a.nodeType==1&&a.tagName.toUpperCase()=="FORM"){a=a;break a}a=a.parentNode;b++}a=null}if(!a)throw new y(12,"Element was not in a form, so could not submit.");b=a;var c=(M.submit||Ba)(b,"submit",void 0);if(t(b.fireEvent)||u(b.fireEvent)){try{(G(b)?G(b).parentWindow||G(b).defaultView:window).event=c}catch(d){}b=b.fireEvent("onsubmit",c)}else b=b.dispatchEvent(c);b&&a.submit()};var Da=[];function N(){if(Ea)Fa[v(this)]=this}var Ea=false,Fa={};N.prototype.u=false;N.prototype.l=function(){if(!this.u){this.u=true;this.g();if(Ea){var a=v(this);if(!Fa.hasOwnProperty(a))throw Error(this+" did not call the goog.Disposable base constructor or was disposed of after a clearUndisposedObjects call");delete Fa[a]}}};N.prototype.g=function(){};function O(a,b){N.call(this);this.type=a;this.currentTarget=this.target=b}w(O,N);O.prototype.g=function(){delete this.type;delete this.target;delete this.currentTarget};O.prototype.q=false;O.prototype.I=true;new Function("a","return a");function P(a,b){a&&this.n(a,b)}w(P,O);m=P.prototype;m.target=null;m.relatedTarget=null;m.offsetX=0;m.offsetY=0;m.clientX=0;m.clientY=0;m.screenX=0;m.screenY=0;m.button=0;m.keyCode=0;m.charCode=0;m.ctrlKey=false;m.altKey=false;m.shiftKey=false;m.metaKey=false;m.H=false;m.i=null;
-m.n=function(a,b){var c=this.type=a.type;O.call(this,c);this.target=a.target||a.srcElement;this.currentTarget=b;var d=a.relatedTarget;if(!d)if(c=="mouseover")d=a.fromElement;else if(c=="mouseout")d=a.toElement;this.relatedTarget=d;this.offsetX=a.offsetX!==undefined?a.offsetX:a.layerX;this.offsetY=a.offsetY!==undefined?a.offsetY:a.layerY;this.clientX=a.clientX!==undefined?a.clientX:a.pageX;this.clientY=a.clientY!==undefined?a.clientY:a.pageY;this.screenX=a.screenX||0;this.screenY=a.screenY||0;this.button=
-a.button;this.keyCode=a.keyCode||0;this.charCode=a.charCode||(c=="keypress"?a.keyCode:0);this.ctrlKey=a.ctrlKey;this.altKey=a.altKey;this.shiftKey=a.shiftKey;this.metaKey=a.metaKey;this.H=pa?a.metaKey:a.ctrlKey;this.J=a.J;this.i=a;delete this.I;delete this.q};m.F=function(){return this.i};m.g=function(){P.r.g.call(this);this.relatedTarget=this.currentTarget=this.target=this.i=null};function Ga(){}var Ha=0;m=Ga.prototype;m.key=0;m.k=false;m.s=false;m.n=function(a,b,c,d,f,e){if(t(a))this.v=true;else if(a&&a.handleEvent&&t(a.handleEvent))this.v=false;else throw Error("Invalid listener argument");this.o=a;this.A=b;this.src=c;this.type=d;this.capture=!!f;this.G=e;this.s=false;this.key=++Ha;this.k=false};m.handleEvent=function(a){if(this.v)return this.o.call(this.G||this.src,a);return this.o.handleEvent.call(this.o,a)};function Q(a,b){N.call(this);this.w=b;this.e=[];if(a>this.w)throw Error("[goog.structs.SimplePool] Initial cannot be greater than max");for(var c=0;c<a;c++)this.e.push(this.b?this.b():{})}w(Q,N);Q.prototype.b=null;Q.prototype.t=null;function Ia(a){if(a.e.length)return a.e.pop();return a.b?a.b():{}}function R(a,b){a.e.length<a.w?a.e.push(b):Ja(a,b)}function Ja(a,b){if(a.t)a.t(b);else if(u(b))if(t(b.l))b.l();else for(var c in b)delete b[c]}
-Q.prototype.g=function(){Q.r.g.call(this);for(var a=this.e;a.length;)Ja(this,a.pop());delete this.e};var Ka;var La=(Ka="ScriptEngine"in o&&o.ScriptEngine()=="JScript")?o.ScriptEngineMajorVersion()+"."+o.ScriptEngineMinorVersion()+"."+o.ScriptEngineBuildVersion():"0";var S,Ma,T,Na,Oa,Pa,Qa,Ra;
-(function(){function a(){return{f:0,j:0}}function b(){return[]}function c(){function l(q){return g.call(l.src,l.key,q)}return l}function d(){return new Ga}function f(){return new P}var e=Ka&&!(la(La,"5.7")>=0),g;Na=function(l){g=l};if(e){S=function(l){R(j,l)};Ma=function(){return Ia(i)};T=function(l){R(i,l)};Oa=function(){R(h,c())};Pa=function(l){R(n,l)};Qa=function(){return Ia(k)};Ra=function(l){R(k,l)};var j=new Q(0,600);j.b=a;var i=new Q(0,600);i.b=b;var h=new Q(0,600);h.b=c;var n=new Q(0,600);
-n.b=d;var k=new Q(0,600);k.b=f}else{S=p;Ma=b;Pa=Oa=T=p;Qa=f;Ra=p}})();var U={},V={},Sa={},Ta={};function Ua(a,b,c,d){if(!d.m)if(d.z){var f=0;for(var e=0;f<d.length;f++)if(d[f].k){var g=d[f].A;g.src=null;Oa(g);Pa(d[f])}else{if(f!=e)d[e]=d[f];e++}d.length=e;d.z=false;if(e==0){T(d);delete V[a][b][c];V[a][b].f--;if(V[a][b].f==0){S(V[a][b]);delete V[a][b];V[a].f--}if(V[a].f==0){S(V[a]);delete V[a]}}}}function Va(a){if(a in Ta)return Ta[a];return Ta[a]="on"+a}
-function Wa(a,b,c,d,f){var e=1;b=v(b);if(a[b]){a.j--;a=a[b];if(a.m)a.m++;else a.m=1;try{var g=a.length;for(var j=0;j<g;j++){var i=a[j];if(i&&!i.k)e&=Xa(i,f)!==false}}finally{a.m--;Ua(c,d,b,a)}}return Boolean(e)}
-function Xa(a,b){var c=a.handleEvent(b);if(a.s){var d=a.key;if(U[d]){var f=U[d];if(!f.k){var e=f.src,g=f.type,j=f.A,i=f.capture;if(e.removeEventListener){if(e==o||!e.M)e.removeEventListener(g,j,i)}else e.detachEvent&&e.detachEvent(Va(g),j);e=v(e);j=V[g][i][e];if(Sa[e]){var h=Sa[e],n=ma(h,f);if(n>=0){C(h.length!=null);D.splice.call(h,n,1)}h.length==0&&delete Sa[e]}f.k=true;j.z=true;Ua(g,i,e,j);delete U[d]}}}return c}
-function W(a,b){if(!U[a])return true;var c=U[a],d=c.type,f=V;if(!(d in f))return true;f=f[d];var e,g;if(ya===undefined)ya=false;if(ya){var j;if(!(j=b))a:{j="window.event".split(".");var i=o;for(;e=j.shift();)if(i[e]!=null)i=i[e];else{j=null;break a}j=i}e=j;j=true in f;i=false in f;if(j){if(e.keyCode<0||e.returnValue!=undefined)return true;a:{var h=false;if(e.keyCode==0)try{e.keyCode=-1;break a}catch(n){h=true}if(h||e.returnValue==undefined)e.returnValue=true}}h=Qa();h.n(e,this);e=true;try{if(j){var k=
-Ma();for(var l=h.currentTarget;l;l=l.parentNode)k.push(l);g=f[true];g.j=g.f;for(var q=k.length-1;!h.q&&q>=0&&g.j;q--){h.currentTarget=k[q];e&=Wa(g,k[q],d,true,h)}if(i){g=f[false];g.j=g.f;for(q=0;!h.q&&q<k.length&&g.j;q++){h.currentTarget=k[q];e&=Wa(g,k[q],d,false,h)}}}else e=Xa(c,h)}finally{if(k){k.length=0;T(k)}h.l();Ra(h)}return e}d=new P(b,this);try{e=Xa(c,d)}finally{d.l()}return e}Na(W);Da[Da.length]=function(a){W=a(W);Na(W)};function Ya(){}
-function Za(a,b,c){switch(typeof b){case "string":$a(a,b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==null){c.push("null");break}if(r(b)=="array"){var d=b.length;c.push("[");var f="";for(var e=0;e<d;e++){c.push(f);Za(a,b[e],c);f=","}c.push("]");break}c.push("{");d="";for(f in b)if(Object.prototype.hasOwnProperty.call(b,f)){e=b[f];if(typeof e!="function"){c.push(d);$a(a,f,c);c.push(":");
-Za(a,e,c);d=","}}c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var ab={'"':'\\"',"\\":"\\\\","/":"\\/","\u0008":"\\b","\u000c":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\u000b":"\\u000b"},bb=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g;
-function $a(a,b,c){c.push('"',b.replace(bb,function(d){if(d in ab)return ab[d];var f=d.charCodeAt(0),e="\\u";if(f<16)e+="000";else if(f<256)e+="00";else if(f<4096)e+="0";return ab[d]=e+f.toString(16)}),'"')};function X(a){switch(r(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return na(a,X);case "object":a=a;if("nodeType"in a&&(a.nodeType==1||a.nodeType==9)){var b={};b.ELEMENT=cb(a);return b}if(aa(a))return na(a,X);a=ea(a,function(c,d){return typeof d=="number"||s(d)});return fa(a,X);default:return null}}
-function db(a,b){if(r(a)=="array")return na(a,function(c){return db(c,b)});else if(u(a))return"ELEMENT"in a?eb(a.ELEMENT,b):fa(a,function(c){return db(c,b)});return a}function fb(a){a=a||document;var b=a.$wdc_;if(!b){b=a.$wdc_={};b.p=da()}if(!b.p)b.p=da();return b}function cb(a){var b=fb(a.ownerDocument),c=ga(b,function(d){return d==a});if(!c){c=":wdc:"+b.p++;b[c]=a}return c}
-function eb(a,b){a=decodeURIComponent(a);var c=b||document,d=fb(c);if(!(a in d))throw new y(10,"Element does not exist in cache");var f=d[a];for(var e=f;e;){if(e==c.documentElement)return f;e=e.parentNode}delete d[a];throw new y(10,"Element is no longer attached to the DOM");};function gb(a){var b=Ca;a=[a];var c;try{if(s(b))b=new Function(b);var d=db(a),f=b.apply(null,d);c={status:0,value:X(f)}}catch(e){c={status:"code"in e?e.code:13,value:{message:e.message}}}Za(new Ya,c,[])}var Y="_".split("."),Z=o;!(Y[0]in Z)&&Z.execScript&&Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());)if(!Y.length&&gb!==undefined)Z[$]=gb;else Z=Z[$]?Z[$]:Z[$]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!='undefined'?window.navigator:null}, arguments);}
diff --git a/core/res/res/raw/toggle_android.js b/core/res/res/raw/toggle_android.js
deleted file mode 100644
index d4da5b7..0000000
--- a/core/res/res/raw/toggle_android.js
+++ /dev/null
@@ -1,30 +0,0 @@
-function(){return function(){var l=this;
-function m(a){var b=typeof a;if(b=="object")if(a){if(a instanceof Array)return"array";else if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if(c=="[object Window]")return"object";if(c=="[object Array]"||typeof a.length=="number"&&typeof a.splice!="undefined"&&typeof a.propertyIsEnumerable!="undefined"&&!a.propertyIsEnumerable("splice"))return"array";if(c=="[object Function]"||typeof a.call!="undefined"&&typeof a.propertyIsEnumerable!="undefined"&&!a.propertyIsEnumerable("call"))return"function"}else return"null";else if(b==
-"function"&&typeof a.call=="undefined")return"object";return b}function aa(a){var b=m(a);return b=="array"||b=="object"&&typeof a.length=="number"}function o(a){return typeof a=="string"}function ba(a){a=m(a);return a=="object"||a=="array"||a=="function"}Math.floor(Math.random()*2147483648).toString(36);var ca=Date.now||function(){return+new Date};function p(a,b){function c(){}c.prototype=b.prototype;a.k=b.prototype;a.prototype=new c};var da=window;function ea(){var a=l.Components;if(!a)return false;try{a.l["@mozilla.org/uuid-generator;1"].o(a.i.r);return true}catch(b){return false}};function q(a){this.stack=Error().stack||"";if(a)this.message=String(a)}p(q,Error);q.prototype.name="CustomError";function fa(a,b,c){var d={};for(var f in a)if(b.call(c,a[f],f,a))d[f]=a[f];return d}function ga(a,b,c){var d={};for(var f in a)d[f]=b.call(c,a[f],f,a);return d}function ha(a,b,c){for(var d in a)if(b.call(c,a[d],d,a))return d};function r(a,b){q.call(this,b);this.code=a;this.name=s[a]||s[13]}p(r,q);var s,ia={NoSuchElementError:7,NoSuchFrameError:8,UnknownCommandError:9,StaleElementReferenceError:10,ElementNotVisibleError:11,InvalidElementStateError:12,UnknownError:13,ElementNotSelectableError:15,XPathLookupError:19,NoSuchWindowError:23,InvalidCookieDomainError:24,UnableToSetCookieError:25,ModalDialogOpenedError:26,ModalDialogOpenError:27,ScriptTimeoutError:28},ja={};for(var ka in ia)ja[ia[ka]]=ka;s=ja;
-r.prototype.toString=function(){return"["+this.name+"] "+this.message};function la(a){for(var b=1;b<arguments.length;b++){var c=String(arguments[b]).replace(/\$/g,"$$$$");a=a.replace(/\%s/,c)}return a}var ma={};function na(a){return ma[a]||(ma[a]=String(a).replace(/\-([a-z])/g,function(b,c){return c.toUpperCase()}))};function t(a,b){b.unshift(a);q.call(this,la.apply(null,b));b.shift();this.p=a}p(t,q);t.prototype.name="AssertionError";function v(a,b){if(!a){var c=Array.prototype.slice.call(arguments,2),d="Assertion failed";if(b){d+=": "+b;var f=c}throw new t(""+d,f||[]);}return a};var w=Array.prototype,x=w.indexOf?function(a,b,c){v(a.length!=null);return w.indexOf.call(a,b,c)}:function(a,b,c){c=c==null?0:c<0?Math.max(0,a.length+c):c;if(o(a)){if(!o(b)||b.length!=1)return-1;return a.indexOf(b,c)}for(c=c;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1},y=w.map?function(a,b,c){v(a.length!=null);return w.map.call(a,b,c)}:function(a,b,c){var d=a.length,f=Array(d),e=o(a)?a.split(""):a;for(var g=0;g<d;g++)if(g in e)f[g]=b.call(c,e[g],g,a);return f},oa=w.some?function(a,b,c){v(a.length!=
-null);return w.some.call(a,b,c)}:function(a,b,c){var d=a.length,f=o(a)?a.split(""):a;for(var e=0;e<d;e++)if(e in f&&b.call(c,f[e],e,a))return true;return false};var z=true,pa="",A;if(z)A=/WebKit\/(\S+)/;if(A){var qa=A.exec(l.navigator?l.navigator.userAgent:null);pa=qa?qa[1]:""};var B;function C(a,b){this.x=a!==undefined?a:0;this.y=b!==undefined?b:0}C.prototype.toString=function(){return"("+this.x+", "+this.y+")"};function D(a,b){this.width=a;this.height=b}D.prototype.toString=function(){return"("+this.width+" x "+this.height+")"};D.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};function E(a){return a.nodeType==9?a:a.ownerDocument||a.document}function ra(a,b){var c=[];return sa(a,b,c,true)?c[0]:undefined}function sa(a,b,c,d){if(a!=null){var f=0;for(var e;e=a.childNodes[f];f++){if(b(e)){c.push(e);if(d)return true}if(sa(e,b,c,d))return true}}return false}function F(a,b,c,d){if(!c)a=a.parentNode;c=d==null;for(var f=0;a&&(c||f<=d);){if(b(a))return a;a=a.parentNode;f++}return null}function G(a){this.e=a||l.document||document}
-function ta(a){a=!z&&a.e.compatMode=="CSS1Compat"?a.e.documentElement:a.e.body;return new C(a.scrollLeft,a.scrollTop)};function ua(a,b){var c=function(d,f){var e=E(d);if(d.selectSingleNode){e.setProperty&&e.setProperty("SelectionLanguage","XPath");return d.selectSingleNode(f)}else if(e.implementation.hasFeature("XPath","3.0")){var g=e.createNSResolver(e.documentElement),h;if(typeof XPathResult!="undefined")h=XPathResult.FIRST_ORDERED_NODE_TYPE;else{if(!ea())throw Error("Document claims it supports XPath yet XPathResult is not defined. Please report this to Selenium developers");h=Components.i.q.FIRST_ORDERED_NODE_TYPE}return e.evaluate(f,
-d,g,h,null).singleNodeValue}return null}(b,a);if(!c)return null;if(c.nodeType!=1)throw Error("Returned node is not an element: "+a);return c};var H="StopIteration"in l?l.StopIteration:Error("StopIteration");function va(){}va.prototype.next=function(){throw H;};function I(a,b,c,d,f){this.a=!!b;a&&J(this,a,d);this.d=f!=undefined?f:this.c||0;if(this.a)this.d*=-1;this.h=!c}p(I,va);I.prototype.b=null;I.prototype.c=0;I.prototype.g=false;function J(a,b,c,d){if(a.b=b)a.c=typeof c=="number"?c:a.b.nodeType!=1?0:a.a?-1:1;if(typeof d=="number")a.d=d}
-I.prototype.next=function(){var a;if(this.g){if(!this.b||this.h&&this.d==0)throw H;a=this.b;var b=this.a?-1:1;if(this.c==b){var c=this.a?a.lastChild:a.firstChild;c?J(this,c):J(this,a,b*-1)}else(c=this.a?a.previousSibling:a.nextSibling)?J(this,c):J(this,a.parentNode,b*-1);this.d+=this.c*(this.a?-1:1)}else this.g=true;a=this.b;if(!this.b)throw H;return a};
-I.prototype.splice=function(){var a=this.b,b=this.a?1:-1;if(this.c==b){this.c=b*-1;this.d+=this.c*(this.a?-1:1)}this.a=!this.a;I.prototype.next.call(this);this.a=!this.a;b=aa(arguments[0])?arguments[0]:arguments;for(var c=b.length-1;c>=0;c--)a.parentNode&&a.parentNode.insertBefore(b[c],a.nextSibling);a&&a.parentNode&&a.parentNode.removeChild(a)};function K(a,b,c,d){I.call(this,a,b,c,null,d)}p(K,I);K.prototype.next=function(){do K.k.next.call(this);while(this.c==-1);return this.b};function wa(a,b){var c=E(a);if(c.defaultView&&c.defaultView.getComputedStyle)if(c=c.defaultView.getComputedStyle(a,null))return c[b]||c.getPropertyValue(b);return""}function L(a,b){return wa(a,b)||(a.currentStyle?a.currentStyle[b]:null)||a.style[b]}
-function xa(a){var b=E(a),c=L(a,"position"),d=c=="fixed"||c=="absolute";for(a=a.parentNode;a&&a!=b;a=a.parentNode){c=L(a,"position");d=d&&c=="static"&&a!=b.documentElement&&a!=b.body;if(!d&&(a.scrollWidth>a.clientWidth||a.scrollHeight>a.clientHeight||c=="fixed"||c=="absolute"))return a}return null};function M(a,b){return!!a&&a.nodeType==1&&(!b||a.tagName.toUpperCase()==b)}
-var ya={"class":"className",readonly:"readOnly"},za=["checked","disabled","draggable","hidden"],Aa=["async","autofocus","autoplay","checked","compact","complete","controls","declare","defaultchecked","defaultselected","defer","disabled","draggable","ended","formnovalidate","hidden","indeterminate","iscontenteditable","ismap","itemscope","loop","multiple","muted","nohref","noresize","noshade","novalidate","nowrap","open","paused","pubdate","readonly","required","reversed","scoped","seamless","seeking",
-"selected","spellcheck","truespeed","willvalidate"];function Ba(a,b){if(8==a.nodeType)return null;b=b.toLowerCase();if(b=="style"){var c=a.style.cssText.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").toLowerCase();return c.charAt(c.length-1)==";"?c:c+";"}c=a.getAttributeNode(b);if(!c)return null;if(x(Aa,b)>=0)return"true";return c.specified?c.value:null}var Ca=["BUTTON","INPUT","OPTGROUP","OPTION","SELECT","TEXTAREA"];
-function Da(a){var b=a.tagName.toUpperCase();if(!(x(Ca,b)>=0))return true;if(Ba(a,"disabled"))return false;if(a.parentNode&&a.parentNode.nodeType==1&&"OPTGROUP"==b||"OPTION"==b)return Da(a.parentNode);return true}function N(a){for(a=a.parentNode;a&&a.nodeType!=1&&a.nodeType!=9&&a.nodeType!=11;)a=a.parentNode;return M(a)?a:null}function O(a,b){b=na(String(b));return wa(a,b)||Ea(a,b)}
-function Ea(a,b){var c=(a.currentStyle||a.style)[b];if(c!="inherit")return c!==undefined?c:null;return(c=N(a))?Ea(c,b):null}function Fa(a){if(m(a.getBBox)=="function")return a.getBBox();var b;if(L(a,"display")!="none")b=new D(a.offsetWidth,a.offsetHeight);else{b=a.style;var c=b.display,d=b.visibility,f=b.position;b.visibility="hidden";b.position="absolute";b.display="inline";var e;e=a.offsetWidth;a=a.offsetHeight;b.display=c;b.position=f;b.visibility=d;b=new D(e,a)}return b}
-function P(a,b){function c(e){if(O(e,"display")=="none")return false;e=N(e);return!e||c(e)}function d(e){var g=Fa(e);if(g.height>0&&g.width>0)return true;if(e.innerText||e.textContent)if(Ga.test(e.innerText||e.textContent))return true;return z&&oa(e.childNodes,function(h){return M(h)&&d(h)})}if(!M(a))throw Error("Argument to isShown must be of type Element");if(M(a,"TITLE"))return(E(a)?E(a).parentWindow||E(a).defaultView:window)==da;if(M(a,"OPTION")||M(a,"OPTGROUP")){var f=F(a,function(e){return M(e,
-"SELECT")});return!!f&&P(f)}if(M(a,"MAP")){if(!a.name)return false;f=E(a);f=f.evaluate?ua('/descendant::*[@usemap = "#'+a.name+'"]',f):ra(f,function(e){return M(e)&&Ba(e,"usemap")=="#"+a.name});return!!f&&P(f)}if(M(a,"AREA")){f=F(a,function(e){return M(e,"MAP")});return!!f&&P(f)}if(M(a,"INPUT")&&a.type.toLowerCase()=="hidden")return false;if(O(a,"visibility")=="hidden")return false;if(!c(a))return false;if(!b&&Ha(a)==0)return false;if(!d(a))return false;return true}
-var Ia="[\\s\\xa0"+String.fromCharCode(160)+"]+",Ga=RegExp("^"+Ia+"$");function Ha(a){var b=1,c=O(a,"opacity");if(c)b=Number(c);if(a=N(a))b*=Ha(a);return b};var Ja=["dragstart","dragexit","mouseover","mouseout"];
-function Q(a,b,c){var d=E(a),f=d?d.parentWindow||d.defaultView:window,e=new C;if(a.nodeType==1)if(a.getBoundingClientRect){var g=a.getBoundingClientRect();e.x=g.left;e.y=g.top}else{g=ta(a?new G(E(a)):B||(B=new G));var h,i=E(a);h=L(a,"position");var j=new C(0,0),u=(i?i.nodeType==9?i:E(i):document).documentElement;if(a!=u)if(a.getBoundingClientRect){h=a.getBoundingClientRect();i=ta(i?new G(E(i)):B||(B=new G));j.x=h.left+i.x;j.y=h.top+i.y}else if(i.getBoxObjectFor){h=i.getBoxObjectFor(a);i=i.getBoxObjectFor(u);
-j.x=h.screenX-i.screenX;j.y=h.screenY-i.screenY}else{var k=a;do{j.x+=k.offsetLeft;j.y+=k.offsetTop;if(k!=a){j.x+=k.clientLeft||0;j.y+=k.clientTop||0}if(z&&L(k,"position")=="fixed"){j.x+=i.body.scrollLeft;j.y+=i.body.scrollTop;break}k=k.offsetParent}while(k&&k!=a);if(z&&h=="absolute")j.y-=i.body.offsetTop;for(k=a;(k=xa(k))&&k!=i.body&&k!=u;){j.x-=k.scrollLeft;j.y-=k.scrollTop}}e.x=j.x-g.x;e.y=j.y-g.y}else{g=m(a.f)=="function";j=a;if(a.targetTouches)j=a.targetTouches[0];else if(g&&a.f().targetTouches)j=
-a.f().targetTouches[0];e.x=j.clientX;e.y=j.clientY}var n=c||{};c=(n.x||0)+e.x;e=(n.y||0)+e.y;g=n.button||0;j=n.bubble||true;h=null;if(x(Ja,b)>=0)h=n.related||null;i=!!n.alt;u=!!n.control;k=!!n.shift;n=!!n.meta;if(a.fireEvent&&d&&d.createEventObject){a=d.createEventObject();a.altKey=i;a.m=u;a.metaKey=n;a.shiftKey=k;a.clientX=c;a.clientY=e;a.button=g;a.relatedTarget=h}else{a=d.createEvent("MouseEvents");if(a.initMouseEvent)a.initMouseEvent(b,j,true,f,1,0,0,c,e,u,i,k,n,g,h);else{a.initEvent(b,j,true);
-a.shiftKey=k;a.metaKey=n;a.altKey=i;a.ctrlKey=u;a.button=g}}return a}function R(a,b,c){var d=c||{};c=d.keyCode||0;var f=d.charCode||0,e=!!d.alt,g=!!d.ctrl,h=!!d.shift;d=!!d.meta;a=E(a).createEvent("Events");a.initEvent(b,true,true);a.charCode=f;a.keyCode=c;a.altKey=e;a.ctrlKey=g;a.metaKey=d;a.shiftKey=h;return a}
-function Ka(a,b,c){var d=E(a),f=c||{};c=f.bubble!==false;var e=!!f.alt,g=!!f.control,h=!!f.shift;f=!!f.meta;if(a.fireEvent&&d&&d.createEventObject){a=d.createEventObject();a.altKey=e;a.n=g;a.metaKey=f;a.shiftKey=h}else{a=d.createEvent("HTMLEvents");a.initEvent(b,c,true);a.shiftKey=h;a.metaKey=f;a.altKey=e;a.ctrlKey=g}return a}var S={};S.click=Q;S.keydown=R;S.keypress=R;S.keyup=R;S.mousedown=Q;S.mousemove=Q;S.mouseout=Q;S.mouseover=Q;S.mouseup=Q;
-function La(a,b,c){c=(S[b]||Ka)(a,b,c);if(m(a.fireEvent)=="function"||ba(a.fireEvent)){try{(E(a)?E(a).parentWindow||E(a).defaultView:window).event=c}catch(d){}a=a.fireEvent("on"+b,c)}else a=a.dispatchEvent(c);return a};function T(a){var b;if(M(a,"OPTION"))b=true;else if(M(a,"INPUT")){b=a.type.toLowerCase();b=b=="checkbox"||b=="radio"}else b=false;if(!b)throw new r(15,"Element is not selectable");b="selected";var c=a.type&&a.type.toLowerCase();if("checkbox"==c||"radio"==c)b="checked";b=ya[b]||b;a=a[b];a=a===undefined&&x(za,b)>=0?false:a;return!!a}function Ma(a){return M(a,"SELECT")}
-function Na(a){if(M(a,"INPUT")&&"radio"==a.type)throw new r(12,"You may not toggle a radio button");var b=!T(a);if(!Da(a))throw new r(12,"Element is not currently enabled and may not be manipulated");if(!P(a,true))throw new r(11,"Element is not currently visible and may not be manipulated");if(M(a,"INPUT")){var c=a.type.toLowerCase();if(c=="checkbox"||c=="radio"){if(a.checked!=b){if(a.type=="radio"&&!b)throw new r(12,"You may not deselect a radio button");if(b!=T(a)){a.checked=b;La(a,"change")}}}else throw new r(15,
-"You may not select an unselectable input element: "+a.type);}else if(M(a,"OPTION")){c=F(a,Ma);if(!c.multiple&&!b)throw new r(15,"You may not deselect an option within a select that does not support multiple selections.");if(b!=T(a)){a.selected=b;La(c,"change")}}else throw new r(15,"You may not select an unselectable element: "+a.tagName);return T(a)};function Oa(){}
-function U(a,b,c){switch(typeof b){case "string":Pa(a,b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==null){c.push("null");break}if(m(b)=="array"){var d=b.length;c.push("[");var f="";for(var e=0;e<d;e++){c.push(f);U(a,b[e],c);f=","}c.push("]");break}c.push("{");d="";for(f in b)if(Object.prototype.hasOwnProperty.call(b,f)){e=b[f];if(typeof e!="function"){c.push(d);Pa(a,f,c);c.push(":");U(a,
-e,c);d=","}}c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var V={'"':'\\"',"\\":"\\\\","/":"\\/","\u0008":"\\b","\u000c":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\u000b":"\\u000b"},Qa=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g;
-function Pa(a,b,c){c.push('"',b.replace(Qa,function(d){if(d in V)return V[d];var f=d.charCodeAt(0),e="\\u";if(f<16)e+="000";else if(f<256)e+="00";else if(f<4096)e+="0";return V[d]=e+f.toString(16)}),'"')};function W(a){switch(m(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return y(a,W);case "object":a=a;if("nodeType"in a&&(a.nodeType==1||a.nodeType==9)){var b={};b.ELEMENT=Ra(a);return b}if(aa(a))return y(a,W);a=fa(a,function(c,d){return typeof d=="number"||o(d)});return ga(a,W);default:return null}}
-function X(a,b){if(m(a)=="array")return y(a,function(c){return X(c,b)});else if(ba(a))return"ELEMENT"in a?Sa(a.ELEMENT,b):ga(a,function(c){return X(c,b)});return a}function Ta(a){a=a||document;var b=a.$wdc_;if(!b){b=a.$wdc_={};b.j=ca()}return b}function Ra(a){var b=Ta(a.ownerDocument),c=ha(b,function(d){return d==a});if(!c){c=":wdc:"+b.j++;b[c]=a}return c}
-function Sa(a,b){a=decodeURIComponent(a);var c=b||document,d=Ta(c);if(!(a in d))throw new r(10,"Element does not exist in cache");var f=d[a];for(var e=f;e;){if(e==c.documentElement)return f;e=e.parentNode}delete d[a];throw new r(10,"Element is no longer attached to the DOM");};function Ua(a){var b=Na;a=[a];var c;try{if(o(b))b=new Function(b);var d=X(a),f=b.apply(null,d);c={status:0,value:W(f)}}catch(e){c={status:"code"in e?e.code:13,value:{message:e.message}}}b=[];U(new Oa,c,b);return b.join("")}var Y="_".split("."),Z=l;!(Y[0]in Z)&&Z.execScript&&Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());)if(!Y.length&&Ua!==undefined)Z[$]=Ua;else Z=Z[$]?Z[$]:Z[$]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!='undefined'?window.navigator:null}, arguments);}
diff --git a/core/res/res/raw/webdriver_readme.txt b/core/res/res/raw/webdriver_readme.txt
deleted file mode 100644
index 5c4667d..0000000
--- a/core/res/res/raw/webdriver_readme.txt
+++ /dev/null
@@ -1,53 +0,0 @@
-The JavaScript files *_android.js are used in frameworks/base/core/java/android/webkit/webdriver/
-. Those files contain closure compiled JavaScript from
-http://selenium.googlecode.com. They are under the Apache 2.0 licence:
-/** @license
-Copyright 2010 WebDriver committers
-Copyright 2010 Google Inc.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-The licence is not included in the compiled code to minimize the size
-of JavaScript injected into web pages.
-
-Those files can be generated by doing the following:
-$svn checkout http://selenium.googlecode.com/svn/trunk/ .
-$./go //javascript/webdriver-atoms/inject:<js_fragment_name>:android
-
-Where <js_fragment_name> should be replaced by the actual name of the fragment to
-generate. For example to generate is_selected_android.js, execute:
-$./go //javascript/webdriver-atoms/inject:is_selected:android
-
-The build file for those rules is under the following:
-http://code.google.com/p/selenium/source/browse/trunk/javascript/webdriver-atoms/inject/build.desc
-Every js_fragment rule generates a JavaScript file containing the corresponding
-JavaScript code snippet.
-
-The current version of the files was generated using revision 11823.
-
-Here is the build command list executed to generate those files:
-./go //javascript/webdriver-atoms/inject:find_element:android
-./go //javascript/webdriver-atoms/inject:find_elements:android
-./go //javascript/webdriver-atoms/inject:get_text:android
-./go //javascript/webdriver-atoms/inject:is_selected:android
-./go //javascript/webdriver-atoms/inject:get_top_left_coordinates:android
-./go //javascript/webdriver-atoms/inject:get_attribute_value:android
-./go //javascript/webdriver-atoms/inject:get_size:android
-./go //javascript/webdriver-atoms/inject:get_value_of_css_property:android
-./go //javascript/webdriver-atoms/inject:is_enabled:android
-./go //javascript/webdriver-atoms/inject:toggle:android
-./go //javascript/webdriver-atoms/inject:set_selected:android
-./go //javascript/webdriver-atoms/inject:is_displayed:android
-./go //javascript/webdriver-atoms:execute_script:android
-./go //javascript/webdriver-atoms/inject:submit:android