Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function vkGetWikiCode(pid,gid){
- var params={gid:gid}
- if ((pid+"").match(/^\d+$/)){
- params['pid']=pid;
- } else {
- params['title']=pid;
- }
- dApi.call('pages.get',params,function(r){
- var data=r.response;
- if (!data.source) {
- alert('Nothing...');
- return;
- }
- var code=(data.source || "").replace(/<br>/gi,'\r\n');
- var box=vkAlertBox('Wiki-code','<h2>'+data.title+'</h2><textarea id="vk_wikicode_area" style="width:460px; height:300px;">'+code+'</textarea>');
- box.setOptions({width:'500px'});
- });
- return false;
- }
- vkGetWikiCode('id_страницы','id_группы');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement