Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LibreJS compatibility #103

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion public/directory.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<title>listing directory {directory}</title>
<style>{style}</style>
<script>
// @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not clear what the purpose of this is, but regardless, this does not link to the correct license. Following this, it pulls the following content, which has the wrong copyright information: http://www.jclark.com/xml/copying.txt

Out license is located at https://github.com/expressjs/serve-index/blob/master/LICENSE generally.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The purpose is for the LibreJS extension to recognize the license. If this is not included, alongside // @license-end, it will not be loaded.

The magnet used is what is listed here in the documentation for the extension as to what it detects, but I can check and see if I can make the magnet reflect the actual copyright information.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha. So yea, I used torrent to load the magnet link there and that is what I got. It would be confusing for the loaded source to say that is the license when it is not. As a reminder, the clause in our license requires that the copyright information must stay intact.

Copy link
Author

@jbmagination jbmagination Oct 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just gave it a test and the magnet works as expected, license recognized. Adding to the PR. Would a squash be helpful?

EDIT: This was probably cache.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! So I have been waiting a long time and so far none of the trackers are able to locate that given bittorrent by the info hash in the magnet link. Are you currently seeding this torrent? Perhapd can you send the bittorrent metadata file that hash points to so I can at least verify this points to the right thing?

Copy link
Author

@jbmagination jbmagination Nov 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, this somehow totally slipped my inbox. So, it's definitely not pointing to anything right now.

Regardless, I've found a better way to do this that AFAIK also retains copyright information and doesn't need a magnet. Will update the PR when I'm not busy 👍


function $(id){
var el = 'string' == typeof id
? document.getElementById(id)
Expand Down Expand Up @@ -70,6 +72,8 @@
$(window).on('content loaded', function(){
$('search').on('keyup', search);
});

// @license-end
</script>
</head>
<body class="directory">
Expand All @@ -79,4 +83,4 @@ <h1><a href="/">~</a>{linked-path}</h1>
{files}
</div>
</body>
</html>
</html>