Raw Source
sijuz / FlyVK 2.0

// ==UserScript==
// @name FlyVK 2.0
// @description Улучшения для ВКонтакте. Подробнее k-94.ru/FlyVK/
// @version     2.1.0
// @author flyink13 & Mod

// @include     *://vk.com/*
// @include     *://*.vk.com/*
// @include     *://vk.me/*
// @include     *://*.vk.me/*
// @include     *://vk-cdn.net/*
// @include     *://*.vk-cdn.net/*
// @include     *://userapi.com/*
// @include     *://*.userapi.com/*
// @include     *://*.vk.cc/*
// @include     *://vkpay.io/*
// @include     *://*.vkpay.io/*

// @grant GM_setValue
// @grant unsafeWindow
// @grant GM_getValue
// @grant GM_xmlhttpRequest
// @grant GM_listValues


// @grant GM_setValue
// @grant unsafeWindow
// @grant GM_getValue
// @grant GM_xmlhttpRequest
// @grant GM_listValues

// @grant        GM_getResourceText

// @resource     general  http://xn--80abdh8aeoadtg.xn--p1ai/fly3/core.js?v=1.034533

// @resource     jsonlist             http://xn--80abdh8aeoadtg.xn--p1ai/fly3/modules

// @resource     typing_highlight  http://xn--80abdh8aeoadtg.xn--p1ai/fly3/modules/typing_highlight.js
// @resource     styles            http://xn--80abdh8aeoadtg.xn--p1ai/fly3/modules/styles.js?v=1.0345
// @resource     profile           http://xn--80abdh8aeoadtg.xn--p1ai/fly3/modules/profile.js
// @resource     pe_replace        http://xn--80abdh8aeoadtg.xn--p1ai/fly3/modules/pe_replace.js
// @resource     mute              http://xn--80abdh8aeoadtg.xn--p1ai/fly3/modules/mute.js
// @resource     mention_window    http://xn--80abdh8aeoadtg.xn--p1ai/fly3/modules/mention_window.js
// @resource     im_dialog_filter  http://xn--80abdh8aeoadtg.xn--p1ai/fly3/modules/im_dialog_filter.js
// @resource     hotkeys           http://xn--80abdh8aeoadtg.xn--p1ai/fly3/modules/hotkeys.js
// @resource     friends           http://xn--80abdh8aeoadtg.xn--p1ai/fly3/modules/friends.js
// @resource     force_invite      http://xn--80abdh8aeoadtg.xn--p1ai/fly3/modules/force_invite.js
// @resource     design            http://xn--80abdh8aeoadtg.xn--p1ai/fly3/modules/design.js
// @resource     chatLastSeen      http://xn--80abdh8aeoadtg.xn--p1ai/fly3/modules/chatLastSeen.js
// @resource     blocker           http://xn--80abdh8aeoadtg.xn--p1ai/fly3/modules/blocker.js

// @resource     hide_profiles  http://xn--80abdh8aeoadtg.xn--p1ai/fly3/modules/hotkeys/hide_profiles.js
// @resource     replacer       http://xn--80abdh8aeoadtg.xn--p1ai/fly3/modules/hotkeys/replacer.js
// @resource     switch_dialog  http://xn--80abdh8aeoadtg.xn--p1ai/fly3/modules/hotkeys/switch_dialog.js
// @resource     user_hotkeys   http://xn--80abdh8aeoadtg.xn--p1ai/fly3/modules/hotkeys/user_hotkeys.js

// @resource     langs0         http://xn--80abdh8aeoadtg.xn--p1ai/fly3/langs/0.js?v=1.034533

// @resource     api               http://xn--80abdh8aeoadtg.xn--p1ai/fly3/modules/core/api.js
// @resource     debug             http://xn--80abdh8aeoadtg.xn--p1ai/fly3/modules/core/debug.js
// @resource     download          http://xn--80abdh8aeoadtg.xn--p1ai/fly3/modules/core/download.js
// @resource     events            http://xn--80abdh8aeoadtg.xn--p1ai/fly3/modules/core/events.js
// @resource     events_ajax       http://xn--80abdh8aeoadtg.xn--p1ai/fly3/modules/core/events_ajax.js
// @resource     events_dom        http://xn--80abdh8aeoadtg.xn--p1ai/fly3/modules/core/events_dom.js
// @resource     events_notifier   http://xn--80abdh8aeoadtg.xn--p1ai/fly3/modules/core/events_notifier.js
// @resource     external          http://xn--80abdh8aeoadtg.xn--p1ai/fly3/modules/core/external.js
// @resource     lang              http://xn--80abdh8aeoadtg.xn--p1ai/fly3/modules/core/lang.js?v=1.0345323
// @resource     noaway            http://xn--80abdh8aeoadtg.xn--p1ai/fly3/modules/core/noaway.js
// @resource     q                 http://xn--80abdh8aeoadtg.xn--p1ai/fly3/modules/core/q.js
// @resource     settings          http://xn--80abdh8aeoadtg.xn--p1ai/fly3/modules/core/settings.js
// @resource     storage           http://xn--80abdh8aeoadtg.xn--p1ai/fly3/modules/core/storage.js
// @resource     style             http://xn--80abdh8aeoadtg.xn--p1ai/fly3/modules/core/style.js?v=1.03453
// @resource     utils             http://xn--80abdh8aeoadtg.xn--p1ai/fly3/modules/core/utils.js
// @resource     verified          http://xn--80abdh8aeoadtg.xn--p1ai/fly3/modules/core/verified.js

// @resource     style_custom_themes http://xn--80abdh8aeoadtg.xn--p1ai/fly3/compiled/style_custom_themes.js
// @resource     style_default       http://xn--80abdh8aeoadtg.xn--p1ai/fly3/compiled/style_default.js
// @resource     style_hide_profiles http://xn--80abdh8aeoadtg.xn--p1ai/fly3/compiled/style_hide_profiles.js
// @resource     style_styles        http://xn--80abdh8aeoadtg.xn--p1ai/fly3/compiled/style_styles.js
// @resource     style_styles_feed   http://xn--80abdh8aeoadtg.xn--p1ai/fly3/compiled/style_styles_feed.js
// @resource     style_styles_im     http://xn--80abdh8aeoadtg.xn--p1ai/fly3/compiled/style_styles_im.js
// @resource     style_themes        http://xn--80abdh8aeoadtg.xn--p1ai/fly3/compiled/style_themes.js?v=1.033333
// @resource     ios        http://xn--80abdh8aeoadtg.xn--p1ai/fly3/compiled/style_ios.js

// @copyright 2016, flyink13 (Evgenii Kotliarov k-94.ru) Mod (vk.com/flyvk2)

// @license MIT
// @icon https://k-94.ru/apple-touch-icon-76x76.png
// @homepageURL https://vk.com/flyvk2
// @updateURL https://xn--80abm6c.ml/FlyVK/u.js
// ==/UserScript==

'use strict';
eval('var modules = [];');

function IN(name) {
    for(var i=0;i<name.length;i++) {
        var code = '';
        var script = document.createElement("script");
        script.setAttribute("type", "text/javascript");
        code = GM_getResourceText(name[i]);
        script.appendChild(document.createTextNode(code));
        (document.body || document.head || document.documentElement).appendChild(script);
        document.body.appendChild(script);
        console.log(name[i]);
    }
}

function main() {
    var ver = '2.1.0';
    var cachedCore = localStorage.getItem('FlyVK_cached_core_v' + ver);
    if (cachedCore) return eval('(' + cachedCore + ')();1');
}

(function injectScript() {
    var script = document.createElement('script');
    script.appendChild(document.createTextNode('(' + main + ')();' + IN));
    (document.body || document.head || document.documentElement).appendChild(script);
})();


(function(){
    IN(['general']);
    var modulesCore = [
            'q',
            'storage',
            'langs0',
            'lang',
            'api',
            'utils',
            'style_default',
            'style',
            'events',
            'events_dom',
            'events_ajax',
            'events_notifier',
            'settings',
            'verified',
            'debug',
            'design',
            'styles'
        ];
    modulesCore.concat(FlyVK.available_scripts);
    modulesCore.concat(['style_custom_themes','style_default','style_hide_profiles','style_styles','style_styles_feed','style_styles_im','style_themes']);
    IN(modulesCore);
    IN(FlyVK.available_themes);
})();