Skip to content
This repository has been archived by the owner on Sep 11, 2018. It is now read-only.

Remove prepending "/r/" to the subreddit name, as it is now automatically done so due a recent Reddit update. #67

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,11 @@ function update() {
$('#save').attr('title', info.saved ? 'Unsave' : 'Save')
}

$('#score').text(info.score)
$('#score').text(info.score ? info.score : '?')
if (info.subreddit) {
var subPath = '/r/'+info.subreddit
$('#subreddit')
.text(subPath)
.attr('href', 'http://www.reddit.com'+subPath)
.text(info.subreddit)
.attr('href', 'http://www.reddit.com'+info.subreddit)
} else {
$('#bar').removeClass('subreddit')
}
Expand Down
Loading