Check for robots

Easy script to check robots.txt content

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

You will need to install an extension such as Tampermonkey to install this script.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==UserScript==
// @name         Check for robots
// @version      0.1
// @description  Easy script to check robots.txt content
// @author       Alfonso Gomez
// @match        http://*/*
// @match        https://*/*
// @grant        GM_xmlhttpRequest
// @require http://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js
// @require https://code.jquery.com/ui/1.12.1/jquery-ui.js
// @grant    GM_addStyle
// @namespace https://greasyfork.org/users/145984
// ==/UserScript==

GM_addStyle ( "                                     \
    #dialogId {                                   \
        z-index: 99999;background-color: #fff;padding: 2%;\
    }                                               \
    .ui-dialog-titlebar{\
        width: 100%;\
        display: inline-table;\
        margin-bottom: 10%;\
    }\                                              \
    .ui-button{\
        float: right;\
    }\
" );

(function() {
    
$(document).on('click','#trigger', function(){  
    var url = window.location;
    GM_xmlhttpRequest ( {
    method:     'GET',
    url:        url + '/robots.txt',
    onload:     function (responseDetails) {
                $("#dialog").html(responseDetails.response);
                $( "#dialog" ).dialog().parent().attr('id', 'dialogId');
                }
     } );
});
    
$('body').append('\
<div id="dialog" title="Robots Result" style="display:none;white-space: pre-line"></div>\
                 <a id="trigger" style="background-color: #f44336;border: none;color: white;padding: 15px 32px;text-align: center;text-decoration: none;display: inline-block;font-size: 16px;margin: 4px 2px;cursor: pointer;cursor:pointer;position: fixed;top: 0;right: 0;z-index: 999999;">Check for Robots TXT</a>\
                ');
})();