Giter Site home page Giter Site logo

apidogru / apidogplusextension Goto Github PK

View Code? Open in Web Editor NEW
14.0 14.0 11.0 1.05 MB

Расширение APIdog Plus для браузеров поддерживающих WebExtensions, позволяющее нормально использовать LongPoll на APIdog

Home Page: https://apidog.ru/plus

License: GNU General Public License v3.0

JavaScript 100.00%
apidog chrome-extension

apidogplusextension's People

Contributors

vladislav805 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

apidogplusextension's Issues

Make uploading files via extension

Listen all upload-forms and if extension available, send file direct.
Also, in this case may be need make uploading photos/screenshots by Ctrl+V

Версия плагина в Chrome webstore

Вы бы обновили в вебсторе хрома плагин до версии 3.0, а то сейчас только через ручную загрузку подгрузить можно.
image

"Подмена ссылок vk.com на apidog.ru на всех сайтах"

Предложение реализовать подмену ссылок на любом сайте с помощью вашего расширения, а не только на сайте apidog.ru.
Или даже более сложный вариант - любое обращение по ссылке vk.com (прямая ссылка из закладок, редирект из выдачи Яндекса на vk.com, редирект сокращателем ссылок и т.д.) перехватывается расширением, и если включена соотв. опция, то расширение не пускает на vk.com (чтобы не сбить статус последнего посещения и тд), трансформирует урл в корректный (apidog.ru), и передаёт в обработку браузером корректный урл.

From ticket 31445

User-Agent and Cookie headers break LongPoll

Setting request headers "Cookie" and "User-Agent" is not permitted in Chromium (at least 69+) with error Refused to set unsafe header "<header>"

I'm not web developer, simply commenting out the following lines works for me pretty well in Chromium.

--- a/libapidog0.js
+++ b/libapidog0.js
@@ -115,8 +115,8 @@ RequestTask.prototype = {
        __send: function(body) {
                this.xhr.open(this.type, this.url, true);
                this.xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
-               this.xhr.setRequestHeader("User-Agent", LongPoll.userAgent);
-               this.xhr.setRequestHeader("Cookie", "");
+               // this.xhr.setRequestHeader("User-Agent", LongPoll.userAgent);
+               // this.xhr.setRequestHeader("Cookie", "");
                this.xhr.send(this.type === "POST" ? body : null);
                return this;
        },
@@ -391,4 +391,4 @@ sendEvent(METHOD_ACCESS_TOKEN_REQUIRE, {}, EVENT_ACCESS_TOKEN_RECEIVED);

Firefox does not have this issue and after my fix it works as fine as it did.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.