Fixed CORS error with allorigins.win
This commit is contained in:
parent
af44b9e594
commit
d2ce62e414
1 changed files with 2 additions and 1 deletions
|
@ -33,8 +33,9 @@
|
|||
</div>
|
||||
</body>
|
||||
<script>
|
||||
$.ajax({ type:'GET', url: 'https://github.com/i12bretro/tutorials/file-list/main', success: function(html){
|
||||
$.ajax({ type:'GET', url: 'https://api.allorigins.win/raw?url='+ encodeURIComponent('https://github.com/i12bretro/tutorials/file-list/main'), success: function(html){
|
||||
m = null;
|
||||
console.log(html);
|
||||
regex = /<div role="rowheader".*?>.*?<a.*?href="\/i12bretro\/tutorials\/commit\/(.*?)">(\d{4}): (.*?)<\/a>.*?<time-ago.*?>(.*?)<\/time-ago>/gmsi
|
||||
while ( (m = regex.exec( html )) != null ){
|
||||
$('#tutorialList').append('<tr><td align="center">'+ m[2] +'</td><td align="left"><a href="https://i12bretro.github.io/tutorials/'+ m[2] +'.html" target="_blank">'+ m[3] +'</a></td><td align="center">'+ m[4] +'</td></tr>');
|
||||
|
|
Loading…
Add table
Reference in a new issue