darcyclarke / repo.js Goto Github PK
View Code? Open in Web Editor NEW:page_facing_up: A plugin to embed Github repos on your site
License: MIT License
:page_facing_up: A plugin to embed Github repos on your site
License: MIT License
clicking "repo.js" link in 1st example at http://darcyclarke.me/dev/repojs/ removes github box and nothing is shown (chrome btw)
Hello,
I'm on Firefox(15.0.1) in Windows and when I try to show my repository, I don't see the last files :
https://github.com/Neckara/IRCServer
In my case, on 12 files , 6 don't appear.
I try on Chrome (22.0.1229.79 m), the 6 files is missing too.
In Internet Explorer (8.0.7600.16385) nothing appear.
I try with the repo.min.js from this repo, it make only one difference on drupal :  appear at each line an go up the name of the files but out of drupal, I have a "?" instead.
In your first exemple : http://darcyclarke.me/dev/repojs/
I see only the 2 first files : fonts and README/md.
In the second exemple, 4 files is missing.
After crossdomain.xml, the file don't appear.
On the Repo.js site you have this as a source example:
$('#repo').repo({ user: 'darcyclarke', 'Repo.js' });
But it should be:
$('#repo').repo({ user: 'darcyclarke', name: 'Repo.js' });
XSS is possible via unescaped filename in git repository, e.g. <img src=x onerror=alert(1)>
.
Repository with POC: https://github.com/ecneladis/xss_github_vector
Tested on Matlab files and it doesn't correctly highlight the source code.
To quickly test:
Thanks for your feature, it's awesome.
Do you think you can add pdf support ? If you are too busy i'll try on my own.
Here is my current project, using your feature.
https://ewskr0.github.io/Epitannal-web/
Keep going :)
I love this plugin but it's just not my style. Thanks so much in advanced ! ๐
I was playing with the demo and noticed this: click into a text file. Click on a line number. Like on Github, the line is highlighted, and the line number added to the URL, perhaps like this:
http://darcyclarke.me/dev/repojs/#vg-4:{20}
However, that link won't actually refer to that line, if (for example) you share it with a coworker.
Is single file display planned? If for example I want to display a README.md
I think It can be interesting to create a GitHub powered website this way, what are your thoughts?
The navigation would be easier if a breadcrumb was above of the files list. Like on GitHub.
Related to #7
If you click the repo name before clicking any file in the repo, the embedded repo disappears. Clicking the repo name after clicking any file works as expected sending you back to the top level of the repo and clicking again does not make the repo disappear.
Pretty much as the title mentions. Is there anyway that this can be modified to work with a self served Gitlab repository? Any suggestions would be really appreciated!
localstorage + new Date() jazziness.
This is evident even on your own site; http://darcyclarke.me/dev/repojs/
Are there plans to fix this?
Experienced in Chrome Version 26.0.1410.65. If I use the repo.js there is no error and works perfectly.
Directory named "model" doesn't show up when repo.js used. To reproduce:
add the tree to the page by follwing:
$('#repo').repo({ user: 'destan', name: 'cevirgec' });
you will see then there is no "model" directory under "source" although there exists in the original tree.
see the original tree here: https://github.com/destan/cevirgec/tree/master/source
It would be nice to be able to use it just like we can here on github repos.
Maybe using hashchange
? http://benalman.com/code/projects/jquery-hashchange/examples/hashchange/
Just a feature request :)
When using the following code:
<div id="repo">
</div>
<script type="text/javascript">
$(document).ready(function () {
$('#repo').repo({ user: 'eat-sleep-code', name: 'powershell.iis' });
});
</script>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
<script type="text/javascript" src="/scripts/repo.min.js" defer="defer"></script>
The following error is thrown: Syntax error, unrecognized expression: [data-id^=powershell.iis]
Simply switching to another repo--such as the following--it works fine:
<div id="repo">
</div>
<script type="text/javascript">
$(document).ready(function () {
$('#repo').repo({ user: 'eat-sleep-code', name: 'css' });
});
</script>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
<script type="text/javascript" src="/scripts/repo.min.js" defer="defer"></script>
Sorry for the vague title, but the file icons does not look good in Firefox
Using Firefox 13.0.1 on OS X 10.7.4
Screenshot: http://postimage.org/image/9pxg3rk7v/
How to do we call this plugin? It seems we need to call the Repo.js script from our site and/or include the code ourselves correct?
I'm trying to get this into a joomla article so I can display a repo there instead of dealing with managing files on the joomla site.
I guess what I'm asking is more than the one line examples showing what I need to do to use Repo.js.
Issue is straight-forward.
Example Directory/Repository Names:
Uncaught TypeError: Cannot read property 'clientHeight' of undefined Repo.js:56
Uncaught Error: Syntax error, unrecognized expression: #repo_split_C & C++ jquery.js:1427
If I have an empty html document with nothing but a div to hold the repo when I first open a file it seems like the div calculates it height before all the GitHub like formatting has been applied so the bottom of the file is cut-off. After the first one has loaded all the rest of the files in the repo work fine because their formatting is applied before they are shown. I suspect it has something to do with the fonts not being downloaded the first time.
Demo link is broken http://darcyclarke.me/dev/repojs/
How does it feel
Trying to implement this awesome script on my github pages found here: https://tacocat777.github.io
I followed instructions from this article (https://www.codediesel.com/javascript/easily-embed-a-github-repo-onto-your-site/), but can't seem to get it to work.
It gets stuck loading and the console has this error output:
While navigating through my repo, clicking on a file causes the file to be opened in two separate Repo.js blocks. The first block is cut off right at the bottom while the second is the full block. Navigating backward using breadcrumbs causes ONE of the blocks to disappear, while the other just stays open until I refresh the page.
Is it possible that you add https support since the highlight packages get blocked on https
When embedding this script in my page, I'm seeing an error on line 176
// Bind to page links
_this.container.on('click', 'a', function(e){
Can't tell if this is my fault or not - perhaps it's a loading issue. Any thoughts as to what might trigger that?
Could you add support for embedding (any) Gist? I'm aware there are already other libs/JS which do this but would be nice if yours did it all.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.