Skip to content

Commit

Permalink
Merge pull request #16 from fewieden/develop
Browse files Browse the repository at this point in the history
fix option shortenText
  • Loading branch information
fewieden authored Mar 12, 2017
2 parents e3c3fbf + ee58992 commit 441b6bd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions MMM-Fuel.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,8 @@ Module.register('MMM-Fuel', {

const address = document.createElement('td');
address.classList.add('xsmall');
address.innerHTML = this.shortenText(`${(`0${data.postCode}`).slice(-5)} ${data.place} \
- ${data.street} ${data.houseNumber}`);
address.innerHTML = this.shortenText(`${(`0${data.postCode}`).slice(-5)} ${data.place} - ${data.street
} ${data.houseNumber}`);
details.appendChild(address);

appendTo.appendChild(details);
Expand Down
6 changes: 3 additions & 3 deletions node_helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const NodeHelper = require('node_helper');

module.exports = NodeHelper.create({

baseUrl: 'https://creativecommons.tankerkoenig.de/json/list.php?',
baseUrl: 'https://creativecommons.tankerkoenig.de/json/list.php',

start() {
console.log(`Starting module: ${this.name}`);
Expand All @@ -31,8 +31,8 @@ module.exports = NodeHelper.create({

getData() {
const options = {
url: `${this.baseUrl}lat=${this.config.lat}&lng=${this.config.lng}&rad=${this.config.radius}\
&type=all&apikey=${this.config.api_key}&sort=dist`
url: `${this.baseUrl}?lat=${this.config.lat}&lng=${this.config.lng}&rad=${this.config.radius
}&type=all&apikey=${this.config.api_key}&sort=dist`
};
request(options, (error, response, body) => {
if (response.statusCode === 200) {
Expand Down

0 comments on commit 441b6bd

Please sign in to comment.