Skip to content
This repository has been archived by the owner on Jun 4, 2022. It is now read-only.

Commit

Permalink
Exclude resources like CSS from personalized suggestions, only show e…
Browse files Browse the repository at this point in the history
…xplicit links.
  • Loading branch information
alcinnz committed Jul 6, 2019
1 parent c7a074e commit aa11ac4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/Models/Links.vala
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@
*/
namespace Odysseus.Model {
public class Link {
public string tag;
public string rel;
public string href;
public Link(string rel, string href) {
this.rel = rel; this.href = href;
public Link(string tag, string rel, string href) {
this.tag = tag; this.rel = rel; this.href = href;
}
}
public async Link[] parse_links(uint8[] src, string url) {
Expand Down Expand Up @@ -53,7 +54,7 @@ namespace Odysseus.Model {
string line;
while ((line = yield hxwls_out.read_line_async()) != null) {
var record = line.split("\t");
links.add(new Link(record[1], record[2]));
links.add(new Link(record[0], record[1], record[2]));
}
return links.to_array();
} catch (Error err) {
Expand Down
2 changes: 1 addition & 1 deletion src/Traits/navigate/harvest-recommendations.vala
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace Odysseus.Traits {

tab.links_parsed.connect((links, _) => {
foreach (var link in links) {
if (link.rel == "" || link.rel == null || link.href.has_prefix("odysseus:")) continue;
if (link.tag != "a" || link.href.has_prefix("odysseus:")) continue;
qCheckHistory.bind_text(1, link.href);
if (!testQuery(qCheckHistory)) continue;

Expand Down

0 comments on commit aa11ac4

Please sign in to comment.