Git Product home page Git Product logo

link_properties_plus's People

Contributors

infocatcher avatar yfdyh000 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

link_properties_plus's Issues

Error after clicking on download-link

After clicking on a download link, the following error is shown in the browser console:

Timestamp: 07.10.2013 20:09:11
Error: [Exception... "Component returned failure code: 0x80004002 (NS_NOINTERFACE) [nsISupports.QueryInterface]"  nsresult: "0x80004002 (NS_NOINTERFACE)"  location: "JS frame :: chrome://linkpropsplus/content/linkPropsPlus.js :: linkPropsPlusSvc.realReferer :: line 821"  data: no]
Source File: chrome://linkpropsplus/content/linkPropsPlus.js
Line: 825

This happens with at least Firefox 23 and 24 in a new profile with only LPP 1.5.2 installed.
This bug also has negative effects on other addons like TabMix Plus 0.4.1.2.

Display resume download ability

Accept-Ranges: bytes + available Content-Length ?
But what about FTP?

We can use color indication to don't increase window height: use green font for Status: 200 OK.

Add ability to send GET request instead of HEAD

Because HEAD request isn't supported by some server-side backends.

We may add Send GET Request item to our context menu for left column. And (probably) add special context menu to Get properties button.

Support for case-insensitive headers

Reported here: https://forum.mozilla-russia.org/viewtopic.php?pid=742599#p742599
Example: https://dl.google.com/dl/softwareremovaltool/win/software_removal_tool.exe
Response:

accept-ranges: bytes
content-length: 3923576
content-type: application/octet-stream
etag: "16a791"
last-modified: Wed, 30 Aug 2017 14:26:57 GMT
server: downloads
vary: *
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
x-xss-protection: 1; mode=block
date: Fri, 08 Sep 2017 08:24:46 GMT
alt-svc: quic=":443"; ma=2592000; v="39,38,37,35"
X-Firefox-Spdy: h2
X-NoScript-ReqData: {}

RFC 7230 - Hypertext Transfer Protocol (HTTP/1.1): 3.2. Header Fields

Each header field consists of a case-insensitive field name followed
by a colon (":"), optional leading whitespace, the field value, and
optional trailing whitespace.

Highlight HTTP headers: use formatting for better readability

Some researches:

  • We can't use simple <html:div />: Ctrl+C will copy data without formatting, but all looks fine with HTML inside <iframe>. Also <iframe type="chrome" /> doesn't receive focus (so, we can't use simple data: URI with chrome:// styles).
  • We should use <br /> to correctly copy data with newlines (also see bug 116083).
  • In our custom "copy row" function we can't use .textContent, it doesn't contain newlines, so we can use .innerHTML + replace or select all text and use .getSelection().toString() (and selection.getRangeAt() may return data without newlines).
  • We should implement context menu manually.
  • We can't use hidden="true" to hide blocks with <iftame> in old Firefox versions (and we have troubles with built-in autosizing with collapsed="true").

Sub tasks:

  • Make sections in HTTP headers collapsable #9
  • Show request headers modifications from browser or other extensions #13 (related, no easy way to patch plain text headers)

Some issues and questions

I see some issues and questions duing localization testing.
I can't reproduce some features:
contextOnSelection
linkPropsPlus.copy*
linkPropsPlus.opts.downloadDialog

showInAppMenu is not working properly in Fx28.0, I see it is placed on DevTools menu instead of the App menu.

Localization of numbers format may not work correctly in some locales

Due to https://bugzilla.mozilla.org/show_bug.cgi?id=999003, "Number.toLocaleString() without locale returns localized digits specified by the OS"

https://github.com/Infocatcher/Link_Properties_Plus/blob/1.5.2/chrome/content/linkPropsPlus.js#L983-L994

In resource://gre/modules/DownloadUtils.jsm:

this.__defineGetter__("gDecimalSymbol", function() {
  delete this.gDecimalSymbol;
  return this.gDecimalSymbol = Number(5.4).toLocaleString().match(/\D/);
});

(from Firefox 33.0a1 (2014-06-25), also see https://bugzilla.mozilla.org/show_bug.cgi?id=1009795)

Anyway, our implementation is better: will be used 123 456.78, if localized numbers doesn't contain digits.

Add toolbar button

With #10 we will have icon for button.
Also toolbar button needed for Australis menu-button...

Special:

  • Implement ability to drag link into button, that placed inside Australis menu-button #16

Localization changes

You can watch this issue to receive notifications about changes in localization.
See Subscribe button on right side:
Screenshot: Subscribe

Show request headers modifications from browser or other extensions

Example:

Services.obs.addObserver(observer, "http-on-modify-request", false);
setTimeout(function() {
    Services.obs.removeObserver(observer, "http-on-modify-request");
}, 5e3);
function observer(subject, topic, data) {
    if(subject instanceof Components.interfaces.nsIHttpChannel) {
        subject.setRequestHeader("Referer", "https://google.com/", false);
        subject.setRequestHeader("User-Agent", "", false);
        subject.setRequestHeader("X-Test", "test", false);
    }
}

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.