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

Feature/website cache busting #813

Merged
merged 7 commits into from
Aug 23, 2021
Merged
8 changes: 4 additions & 4 deletions docs/assets/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ devicon.controller('IconListCtrl', function($scope, $http, $compile) {
console.log('Unable to determine latest release version, fallback to master.')
});


var baseUrl = `https://cdn.jsdelivr.net/gh/${gitHubPath}/`
var versionStr = '@' + $scope.latestReleaseTagging;
var baseUrl = `https://cdn.jsdelivr.net/gh/${gitHubPath}${versionStr}/`

// Get devicon.json
$http.get(baseUrl + '/devicon.json').success(function(data) {
$http.get(baseUrl + 'devicon.json').success(function(data) {

/*
| Re-format devicon.json
Expand Down Expand Up @@ -126,7 +126,7 @@ devicon.controller('IconListCtrl', function($scope, $http, $compile) {
*/
$scope.selectSvg = function(svgVersion, index) {

$http.get(baseUrl + '/icons/' + $scope.selectedIcon.name + '/' + $scope.selectedIcon.name + '-' + svgVersion + '.svg').success(function(data){
$http.get(baseUrl + 'icons/' + $scope.selectedIcon.name + '/' + $scope.selectedIcon.name + '-' + svgVersion + '.svg').success(function(data){

var svgElement = angular.element(data);
var innerSvgElement = null;
Expand Down
5 changes: 4 additions & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,10 @@ <h3 class="cbp-ig-title">{{icon.name}}</h3>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.19/angular.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.19/angular-sanitize.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.19/angular-animate.min.js"></script>
<script src="assets/js/script.js"></script>

<script>
document.write("<script src='assets/js/script.js?" + Date.now() + "'><\/script>");
</script>

<script>
(function(i, s, o, g, r, a, m) {
Expand Down