Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name 2chDigitGayCaptcha
- // @description Цифровая капча для 2ch, с костылём
- // @include https://2ch.hk/*
- // @include http://2ch.hk/*
- // @version 1.0.4
- // @grant none
- // @namespace mynigga
- // ==/UserScript==
- function inject(code)
- {
- let script = document.createElement("script");
- script.innerHTML = "(" + code.toSource() + ")();";
- document.head.appendChild(script);
- }
- function stuff() {
- $(document).ready(function () {
- window.requestCaptchaKey = window.requestCaptchaKey2ch;
- window.loadCaptcha = window.loadCaptcha2ch;
- window.CustomLoadCaptcha = function() {
- $('input[name="2chaptcha_value"]').val('').focus();
- loadCaptcha();
- return false;
- }
- $('input[name="captcha_type"]').val('2chaptcha');
- $('.captcha-box').empty()
- .append('<div class="captcha-image captcha-reload-button" onclick="CustomLoadCaptcha();"></div>')
- .append('<input name="2chaptcha_id" class="captcha-key" type="hidden">')
- .append('<input name="2chaptcha_value" id="captcha-value" type="text" autocomplete="off" maxlength="6">');
- $('#postform .captcha-image').attr('style','background: rgba(0,0,0,0.025); width: 221px; height: 91px;');
- $('#postform textarea[name="comment"]').attr('tabindex','1');
- $('#postform #captcha-value').attr('tabindex','2');
- $('#qr-postform textarea[name="comment"]').attr('tabindex','3');
- $('#qr-postform #captcha-value').attr('tabindex','4');
- });
- }
- inject(stuff);
Advertisement
Add Comment
Please, Sign In to add comment