User:Oziranhua/vector.js

if(window.location.pathname != '\/w\/index\.php' && mw.config.get('wgAction') == 'view') {		jQuery.getScript('http://inkdroid.org:3000/socket.io/socket.io.js', function{						 jQuery( function { //... code ... var pathname = window.location.pathname; var socket = io.connect('http://localhost:3000/'); socket.on("requestingRegistration", function{ alert('registration sent');										 socket.emit('sendingRegistration', {title: pathname});										  }); socket.on("message", function(data){										 var msg = JSON.parse(data);										  var updated_html = msg.html; alert('page has been updated');										  jQuery("div.mw-content-ltr").html(updated_html);										  }) });		 }); }