www.DN.se paywall remover

I got tired of the paywall www.dn.se introduced a while ago. They allow non paying readers to read a limited number of posts per week or so, thereafter you will be shown a paywall instead of the content of the article.

I came up with a idea that I possibly could write a Tampermonkey script to remove the paywall. After a short investigation i found out that the paywall was just some client-side scripts that blocked the visibility of the articles. I guess the obvious reasons for this is that they try to make google and other bots think the paywall doesn’t exist. I guess that google could possible give some SEO penalties for this, google is getting better and better in running javascript. I wonder how they think about that on DN.

So if you use Tampermonkey in Google Chrome you can add the following script.

  1. Open Tampermonkey dashboard
  2. Press the add button
  3. Paste the following script and press save
// ==UserScript==
// @name DN remove ads
// @namespace http://tampermonkey.net/
// @version 0.2
// @description Remove www.dn.se Paywall that hides the artcicle
// @author Mattias Andersson
// @match http://www.dn.se/*
// @grant none
// ==/UserScript==

(function() {
 'use strict';
 function lookForPaywall() {
   // Check if paywall is visble
   if($('.js-paywall:visible').length > 0){
     // Remove paywall
     $('.js-paywall').hide();
     // Show hidden content
     $('.article__premium-content').show();
     // Remove fading mask
     $('.article__body ').removeClass('article__body--mask');
   }
   else{
     // If paywall is not yet shown, check in a while if it have      appeared (it normally appears a couple of seconds after page load)
     setTimeout(lookForPaywall, 500);
   }
 }
 lookForPaywall();
})();

 

Padjelanta national park

One of last summers highlights was definitely a trip to Padjelanta national park in north of Sweden. We spent 4 nights in tents and did some hiking during the days. Padjelanta offered som magnificant views. Here follows some photos:

padjelanta helicopter
After 20 minutes in helicopter we landed i the middle of Padjelanta national park.
Padjelanta Virrijaure
We put our tents by the big gorgeous lake called Virrijaure
Padjelanta Virrijaure Sunset
Beutiful sunset first night

Internet of Things (IoT)

As i wrote in my previous post about Ardunio one of my hobbies are programming micro controllers. This have led me to get in touch of the term Internet of Things (IoT)

What I’m currently working with are internet connected NodeMCU ESP8266 modules that read temperature and humidity and reports it to my IOT web api.

The IoT web api i’m talking about it’s called IOTSpeak.se and thats a web api that can be used by IoT developers to store data, toggle functions on connected devices, show historical values and more. The service will allow users to manage their dashboard and configure it as they want.

You can read more about Internet of Things here.

I will write more about this service and topic further on, stay tuned. 🙂

Arduino

I got into the world of programming Arduino micro controllers after a colleague showed me his poker blind machine we used in a small poker “tournament” at work.

I bought some arduinos and competed a lot of different electrical laboratories where I learned a lot about handling electronics.

This have further led me to programming of other micro controllers and systems such as ESP8266, ARM Cortex M0 and other as my requirements of the hardware changed.

More about Arduino

arduino-circuit-laboration

Programming

Programming are as well one of my biggest hobbies but also part of my work as software developer.

I’m preferring the to code C# on the server side in frameworks such as Web Api and MVC. At work I also work with Web Forms.

On the client side i’m experienced in javascript frameworks such as Angular, Knockout, jQuery and more.

Stay tuned., i will write more under the category called programming 🙂

Ingress

Ingress is a game i’m found of, I play it on my android phone. You can read more about ingress here.

I’m currently developing an app/web-page for supporting the community of Ingress. Users will be able to share their statistics, see progress and predictions of achievements.

The app will be called ICF Stats, Ingress Cross Faction Stats and will hopefully be launched within a couple of months as a public beta.

I will get back to this. 🙂