Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Agario Extension
- // @version 1
- // @description yaser extension
- // @namespace yaser.agar
- // @author ysr , vnx
- // @match *://agar.io/*
- // @run-at document-start
- // @connect cdn.ogario.ovh
- // @connect ogar.io
- // @connect extension.yaseragar.ml
- // @connect ogar.ovh
- // @grant GM.xmlHttpRequest
- // ==/UserScript==
- if (location.host == 'agar.io' && location.pathname === '/' ) {
- location.href = 'https://agar.io/agario';
- return;
- }
- var mode = location.pathname.slice(1)
- var url;
- switch(mode){
- case 'ogario':
- url = 'https://cdn.ogario.ovh/v4/beta/'
- break;
- case 'extension':
- url = 'https://extension.yaseragar.ml/extension.html'
- break;
- case 'dev': url = 'http://ogar.ovh/index.html'
- break;
- window.stop();
- break;
- default: url = 'https://extension.yaseragar.ml/extension.html'
- console.log(mode)
- }
- document.documentElement.innerHTML = "Loading";
- if(mode=='none'){
- document.open();
- document.write('Hello');
- document.close();
- }else{
- GM.xmlHttpRequest({
- method: "GET",
- url: url,
- onload: function(e) {
- var D = window.document;
- var newDoc = D.implementation.createHTMLDocument();
- D.replaceChild (
- D.importNode (newDoc.documentElement, true),
- D.documentElement
- );
- document.open();
- document.write(e.response);
- document.close();
- }
- });
- }
Add Comment
Please, Sign In to add comment