Skip to content

Commit

Permalink
Updated superagent
Browse files Browse the repository at this point in the history
- Updated package.json repository urls
  • Loading branch information
mariuskueng committed May 29, 2019
1 parent 73f8a9e commit 891c251
Show file tree
Hide file tree
Showing 3 changed files with 7,658 additions and 6 deletions.
5 changes: 4 additions & 1 deletion dist/softpage.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,10 @@ return /******/ (function(modules) { // webpackBootstrap
}
// otherwise, do it the regular way
else {
_superagent2.default.get(href).set('X-Requested-With', 'XMLHttpRequest').end(function (error, result) {
// Append softpage=True to the request URL in case the responding page behaves differently for softpages.
var sofpageIdentificationUrlParameter = href.indexOf('?') === -1 ? '?softpage=true' : '&softpage=true';
var softpageUrl = href + sofpageIdentificationUrlParameter;
_superagent2.default.get(softpageUrl).set('X-Requested-With', 'XMLHttpRequest').end(function (error, result) {
_this.modal.open();
_this.modal.setContent(result.text);
if (_this.options.onPageLoaded) {
Expand Down
Loading

0 comments on commit 891c251

Please sign in to comment.