Skip to content
This repository has been archived by the owner on Jan 28, 2023. It is now read-only.

Commit

Permalink
Merge pull request #10 from coldrye-confluence/gh-6
Browse files Browse the repository at this point in the history
augment headers without links only
  • Loading branch information
silkentrance authored Nov 12, 2021
2 parents ca47869 + 98942e9 commit d9eeee2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# CHANGELOG

## 1.0.0-FINAL (2018-10-05)
## 1.0.3-FINAL (2021-11-12)

- fix #6: augment headers without links only
- fix #7: upgrade to confluence 7.13.0
- fix #3: remove extraneous package export

## 1.0.2-FINAL (2018-10-05)

- initial version
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>eu.coldrye.confluence.plugins</groupId>
<artifactId>clickable-anchors-plugin</artifactId>
<version>1.0.2-FINAL</version>
<version>1.0.3-FINAL</version>

<organization>
<name>coldrye</name>
Expand Down
15 changes: 5 additions & 10 deletions src/main/resources/js/clickable-anchors-plugin-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,12 @@ AJS.$(document).ready(function () {
.addClass("clickable-anchors-plugin-link");
};

AJS.$("#content span.confluence-anchor-link").each(function (_, elt) {

createAnchor(elt.id)
.text("#")
.appendTo(elt);
});

AJS.$("#content :header[id]").each(function (_, elt) {

createAnchor(elt.id)
.append($(elt).contents())
.appendTo(elt);
var header = $(elt);
var anchor = createAnchor(elt.id);
if (header.find('a').length == 0) {
header.contents().wrap(anchor);
}
});
});

0 comments on commit d9eeee2

Please sign in to comment.