Skip to content

Commit

Permalink
Fixed for the new Assets GitHub view
Browse files Browse the repository at this point in the history
  • Loading branch information
aonez committed Aug 15, 2018
1 parent 629d68e commit 83f7e6d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
8 changes: 4 additions & 4 deletions GitHubCounter.safariextension/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
<key>Author</key>
<string>aone</string>
<key>Builder Version</key>
<string>12603.2.4</string>
<string>13605.3.8</string>
<key>CFBundleDisplayName</key>
<string>GitHubCounter</string>
<key>CFBundleIdentifier</key>
<string>com.aone.safari.GitHubCounter</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleShortVersionString</key>
<string>1.1.0</string>
<string>1.1.1</string>
<key>CFBundleVersion</key>
<string>26</string>
<string>27</string>
<key>Content</key>
<dict>
<key>Scripts</key>
Expand All @@ -34,7 +34,7 @@
<key>Description</key>
<string>Displays releases download count counter. Thanks to @addshore and Nick Roach.</string>
<key>DeveloperIdentifier</key>
<string>4FG648TM2A</string>
<string>0000000000</string>
<key>ExtensionInfoDictionaryVersion</key>
<string>1.0</string>
<key>Permissions</key>
Expand Down
8 changes: 7 additions & 1 deletion GitHubCounter.safariextension/contentscript.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@ xmlHttp.onreadystatechange = function () {
var dwnCount = document.createElement( 'small' );
dwnCount.className = 'githubdownloadscounter text-gray float-right'; // Right style
dwnCount.appendChild( document.createTextNode(downloadMap[el.href] + ' downloads' ) )
el.appendChild( dwnCount );
var sizes = el.getElementsByTagName('small');
if (sizes) {
var size = sizes[0];
if (size) {
el.insertBefore(dwnCount, size);
}
}
}
}
break;
Expand Down
2 changes: 1 addition & 1 deletion GitHubCounter.safariextension/style.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ul.release-downloads li a small:not(.githubdownloadscounter){
details ul li a small:not(.githubdownloadscounter){
text-align: right;
}

Expand Down

0 comments on commit 83f7e6d

Please sign in to comment.