jxmot
jxmot / github-feeds Goto Github PK
View Code? Open in Web Editor NEWThis repository contains a "GitHub Feed" browser plug-in.
License: MIT License
This repository contains a "GitHub Feed" browser plug-in.
License: MIT License
jxmot
jQuery will crash when a github repository description contains any tag. For example:
A PHP script that reads an HTML file, finds all <link> and <script> tags. The local files that are referenced in those tags are concatenated into single CSS and JS files.
Will cause the crash, it's because that text will be embedded into HTML. And the $().html() that used for rendering will see them and try to resolve the tags.
It's unfortunate that jQuery does not provide any usable information. It only says Uncaught SyntaxError: Unexpected identifier
.
It seems that retrieving the JSON data locally (anti rate limiting) takes more time than getting the data directly from GitHub.
There is no obvious cause, but the delay is noticeable at 5 to ~15 seconds.
a) Try to find the cause, it's likely something strange on the server.
b) Try to determine where the slow down is happening, could be one or more of:
Investigate the worth and effort for:
repo.topics[]
items into a master associative array. And use the topic text as the key and keep a "topic occurrence" count in each.update README to match changes
Determine effort to update the "time ago" fields in the entries within the activity tab. An update interval of ~5min may be sufficient.
Detect descriptions that are null
and replace with No Description Provided.
The renderMD()
function in utils.js needs the string.replace()
calls fixed. They should be using regex to replace all occurrences or be changed to replaceAll()
.
Github accepts markdown formatting in issues, and renders on site. Add the ability to do this in the activity entries only.
and sanitize any embedded html
- convert "\n" to
- convert "\r" to nothing
- TBD
Potential candidates:
https://api.github.com/users/{user}/starred?per_page=100
, add data gather to CRON taskIt might be necessary to handle "paging" when getting responses from Github. This will not occur if the anti rate limiting feature is being used.
In regards to the bash scripts curl
does not understand Github's pagination. Currently we can get only up to 100 repositories, beyond that won't be accessible.
If requests go direct to Github then pagination might be necessary.
// example
nextUrl = ajx.getAllResponseHeaders().match(/<(.*)>; rel="next"/);
In /assets/js/util.js:renderMD()
an error occurs with the backtick. In some cases the rendering gets confused and misses a backtick.
Observe how issue #20 displays the comments. The issue will be seen there.
index.php has this loop:
// if the file is being updated its length
// will be 0. What until the update is done.
while(filesize($datafile) === 0) {
sleep(3);
clearstatcache();
error_log('github-feeds: waiting for non-zero :'.$datafile,0);
}
$fileid = fopen($datafile,'r');
During certain GitHub API issues (responses are taking to much time) the file will remain at zero-length almost indefinitely. There needs to be a limitation on the loop so that it will generate an error w/o causing much disturbance to the client.
The zero-length file is created by the curl
calls in the API scripts. This is because the curl
command has its output captured and redirected to a file. That file is recreated each time so it's length will be zero until GitHub sends a response.
Combine the arguments and the local variable "options" into a single object. It will replace the arguments.
It's there, it's just moved out of the way in portrait view. One possible solution would be to change the CSS of the header to use CSS grid.
"PullRequestEvent" is missing from ibacor_activs()
Replace all V3 with V4 requests:
Investigate whether or not there is value in filtering out specified repos from the list.
Investigate if repository names can contain spaces. If so then check all code that touches the repository name.
If issues are found fix them.
When a repo is starred (or forked?) then it will appear in [OWNER]repos.json
. However there is nothing that the repository record contains that will indicate that either has occurred.
The "to top" button does not work correctly when there are 2 feeds (two usernames). This is because there is only one instance and the last "to top" button enabled will have precedence.
Using github-feed-default.css
as a starting point create github-feed-dark.css
and modify the colors for a "dark" theme.
Repositories that are low priority, or are old but receive occasional maintenance are showing in the list.
gfapi/index.php
and gfapi/filter.php
- add filterEvents()
, it will operate identically to filterRepos()
. This will limit events to only repos that are enabled in gfapi/filter.json
.Some "PushEvent" events do not contain any event.payload.commits[]
. This causes a failure due to an "undefined" when accessing a item in event.payload.commits[X]
.
github-feeds.js
- in events()
when event.type == "PushEvent"
test event.payload.commits.length
for 0
and do nothing if true.The light/dark switch icons (๐ and ๐) won't display on older(?) browsers.
Evaluate the effort of changing to something more "generic".
The Firefox Android browser is a failure. Will need to add:
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.