\documentclass[a4paper, 11pt]{article}
\renewcommand{\familydefault}{\sfdefault}
\usepackage{a4wide}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{color}
\usepackage{graphicx}
\usepackage{setspace}
\usepackage{ulem}
\usepackage{listings}
\usepackage{float}
\usepackage[rflt]{floatflt}
\usepackage{tabularx}
\setlength{\parindent}{0pt}
\title{use canvas for grayscale - Vanilla JS}
\usepackage[
pdftitle={use canvas for grayscale - Vanilla JS}
pdfsubject={Mit JavaScript farbige Bilder in Graustufen anzeigen}
pdfauthor={Udo Schmal}
pdfkeywords={JavaScript}
]{hyperref}
\definecolor{darkblue}{rgb}{0,0,.5}
\hypersetup{pdftex=true, colorlinks=true, breaklinks=true, linkcolor=darkblue, menucolor=darkblue, pagecolor=darkblue, urlcolor=darkblue}
\begin{document}use canvas for grayscale - Vanilla JS
\singlespacing
{\LARGE \textbf{\label{sec:title}JavaScript use canvas for grayscale}}

Mit JavaScript farbige Bilder in Graustufen umwandeln, durch setzen von class=\&quot;grayscale\&quot; im img-Tag.

On using this JavaScripts all images with class \&quot;grayscale\&quot; get converted to grayscaled images.

\singlespacing
{\large \textbf{Example:}}

\singlespacing
{\large \textbf{JavaScript:}}

\href{https://www.gocher.me/code/grayscale/grayscale.js}{grayscale.js}

\singlespacing
{\large \textbf{HTML:}}

\href{https://www.gocher.me/code/grayscale/grayscale.htm}{grayscale.htm}
\label{sec:grayscale.js}\end{document}