Skip to content

Commit

Permalink
Merge pull request #57 from srm985/release-2.0.6
Browse files Browse the repository at this point in the history
Release 2.0.6
  • Loading branch information
srm985 authored Aug 21, 2018
2 parents 9a7270c + 3f825c6 commit 0178732
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 8 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Latest Version

Current Version
```sh
<script src="https://cdn.jsdelivr.net/npm/[email protected].4/web/axure-redline-plugin.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected].6/web/axure-redline-plugin.js"></script>
```

There are several ways to use this "install" this plugin. The easiest option is to copy the script link above into your AxShare project as a plugin. Copy the script of the version you'd like to use, or simply use the script marked "latest" to ensure you're always subscribed to the latest application updates. The code in the scripts above is served from a CDN to ensure a fast response, no matter your location.
Expand Down Expand Up @@ -161,3 +161,7 @@ This project is licensed under the MIT License - see the [LICENSE](https://githu
#### Version 2.0.5

* When sharing the business link, annotations are disabled by default through the AxShare interface panel.

#### Version 2.0.6

* Revised how sharing links are formed to accommodate private enterprise server links.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "axure-redline-tool",
"version": "2.0.5",
"version": "2.0.6",
"description": "An interactive redline tool plugin for Axure remotely-hosted projects.",
"main": "gulpfile.js",
"scripts": {
Expand Down
22 changes: 18 additions & 4 deletions src/js/measure.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,18 +235,32 @@ function checkToolPermitted() {
*/
function setSharingLinks() {
const pageURL = window.parent.location.href,
disableAnnotations = 'fn=0';
disableAnnotations = 'fn=0',
regexBaseURL = /^.*(\/|\.html)/;

// Ensure we always select the PAGES tab.
const selectHomePage = (pageURL) => {
return pageURL.replace(/g=\d&/, 'g=1&');
}
};

// Extract our base URL up until last forward slash found or .html extension.
const extractedBaseURL = () => {
let extractedURL = '';

try {
extractedURL = pageURL.match(regexBaseURL)[0];
} catch (err) {
extractedURL = '';
}

return extractedURL;
};

let devURL = '',
businessURL = '';

devURL = pageURL.replace(/\.com(\/)?/, '.com?redline=dev');
businessURL = pageURL.replace(/\.com(\/)?/, '.com?redline=business');
devURL = pageURL.replace(extractedBaseURL(), `${extractedBaseURL()}?redline=dev`);
businessURL = pageURL.replace(extractedBaseURL(), `${extractedBaseURL()}?redline=business`);

businessURL = `${businessURL}&${disableAnnotations}`;

Expand Down
2 changes: 1 addition & 1 deletion web/axure-redline-plugin.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion web/plugin.txt

Large diffs are not rendered by default.

0 comments on commit 0178732

Please sign in to comment.