Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name VkOpt Plugin: UserMenu add item example
- // @description (by KiberInfinity id13391307)
- // @include http://*vkontakte.ru/*
- // @include http://*vk.com/*
- // ==/UserScript==
- function vkUserNewsMenuItem(uid,gid){
- if (uid) return ['<a href="/feed?owner='+uid+'§ion=owner">News!</a>'];
- }
- if (!window.vkopt_plugins) vkopt_plugins={};
- (function(){
- var PLUGIN_ID = 'vkumenuex';
- var PLUGIN_NAME = 'vk my test plugin';
- var ADDITIONAL_CSS='';
- vkopt_plugins[PLUGIN_ID]={
- Name:PLUGIN_NAME,
- css:ADDITIONAL_CSS,
- // FUNCTIONS
- init: null, // function(); //run on connect plugin to vkopt
- onLocation: null, // function(nav_obj,cur_module_name); //On new location
- onLibFiles: null, // function(file_name); //On connect new vk script
- onStorage : null, // function(command_id,command_obj);
- processLinks: null, // function(link);
- processNode: null, // function(node);
- pvActions: null, // function(photo_data); || String //PHOTOVIEWER_ACTIONS
- albumActions: null, // function(oid,aid); || Array with items. Example [{l:'Link1', onClick:Link1Func},{l:'Link2', onClick:Link2Func}]
- vidActLinks: null, // function(video_data,links_array); || String. video_data may contain iframe url
- onResponseAnswer: null, // function(answer,url,params); 'answer' is array. modify only array items
- UserMenuItems: vkUserNewsMenuItem // function(uid) || string
- };
- if (window.vkopt_ready) vkopt_plugin_run(PLUGIN_ID);
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement