JS Bin Search

Add find and replace features in jsbin.com

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

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

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name         JS Bin Search
// @version      0.2
// @description  Add find and replace features in jsbin.com
// @author       himalay
// @namespace    https://himalay.com.np
// @include     *://jsbin.com/*
// @grant       GM_addStyle
// ==/UserScript==
//
// The keybindings
// ===============
// Ctrl-F / Cmd-F : Start searching
// Ctrl-G / Cmd-G : Find next
// Shift-Ctrl-G / Shift-Cmd-G : Find // previous
// Shift-Ctrl-F / Cmd-Option-F : Replace
// Shift-Ctrl-R / Shift-Cmd-Option-F : Replace all

(function () {
    ['//codemirror.net/addon/dialog/dialog.js', '//codemirror.net/addon/search/search.js'].forEach(function(scriptURL){
        document.body.appendChild(Object.assign(document.createElement('script'), {
            type: 'text/javascript',
            src: scriptURL
        }));
    });
})();

GM_addStyle('.CodeMirror-dialog{position:absolute;left:0;right:0;background:inherit;z-index:15000;padding:.1em .8em;overflow:hidden;color:inherit}' +
            '.CodeMirror-dialog-top{border-bottom:1px solid #eee;top:0}' +
            '.CodeMirror-dialog-bottom{border-top:1px solid #eee;bottom:0}' +
            '.CodeMirror-dialog input{border:none;outline:0;background:0 0;width:20em;color:inherit;font-family:monospace}' +
            '.CodeMirror-dialog button{font-size:70%}');