Sha256: bf51237109c4a18f399428effaab857aff4aa913fa8efa00909251858ef44a33

Contents?: true

Size: 630 Bytes

Versions: 3

Compression:

Stored size: 630 Bytes

Contents

var getQueryParams = function () {
  var query = window.location.search.substring(1); // delete ?
  if (!query) {
    return false;
  }
  return _
    .chain(query.split('&'))
    .map(function (params) {
      var p = params.split('=');
      return [p[0], decodeURIComponent(p[1])];
    })
    .object()
    .value();
};

function substituteQueryParams() {
  var vars = getQueryParams();
  _(['frompage', 'topage', 'page', 'webpage', 'section', 'subsection', 'subsubsection']).each(function(klass) {
    _(document.getElementsByClassName(klass)).each(function(element) {
      element.textContent = vars[klass];
    });
  });
}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
aub-payroll-1.1.0 lib/aub/payroll/summary_file/templates/footer.js
aub-payroll-1.0.1 lib/aub/payroll/summary_file/templates/footer.js
aub-payroll-1.0.0 lib/aub/payroll/summary_file/templates/footer.js