Skip to content

Instantly share code, notes, and snippets.

@timguy
Created June 9, 2020 19:54
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timguy/ae403d5569176c8980ae010c5ac4b275 to your computer and use it in GitHub Desktop.
Save timguy/ae403d5569176c8980ae010c5ac4b275 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name New script - lvz.de
// @namespace Violentmonkey Scripts
// @match https://www.lvz.de/*
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js
// @grant none
// @version 1.0
// @author -
// @description 3/24/2020, 9:51:28 PM
// ==/UserScript==
var nodes = document.querySelectorAll('script[type="application/ld+json"]');
var first = nodes[0];
var last = nodes[nodes.length- 1];
var text = JSON.parse(last.innerText).articleBody
console.log('Inhalt 1: ' + text);
var inclLibText = '<div id="inclLibText" class = "pdb-article-body">Platzhalter<br/> <progress id="biboProgress" value="0" max="100"> <i class="fa fa-car"></i> </progress> <div id="biboContent"> </div> </div> ';
$(inclLibText).insertBefore('.pdb-parts-paidcontent-freeuntilbadge');
$('#inclLibText').attr('style', 'border-radius: 25px; background: #73AD21; padding: 20px;');
$('#inclLibText').replaceWith('<p class="pdb-article-body"> ' + text + '</p>');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment