Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // My Vk Hello World
- function MyVkHelloWorld(nav_obj,cur_module_name){
- // function topMsg(text, seconds, color) - common.js
- topMsg('Module: '+cur_module_name+'<br>'+'navObj: '+JSON.stringify(nav_obj));
- }
- // Кусок кода для подключения своих функций из "плагина":
- if (!window.vkopt_plugins) vkopt_plugins={};
- (function(){
- var PLUGIN_ID = 'vkmyplugin';
- 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: MyVkHelloWorld, // 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: null // function(uid) || string
- };
- if (window.vkopt_ready) vkopt_plugin_run(PLUGIN_ID);
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement