The code below is borrowed from this post. Sol #1: I expected foo
to be highlighted, it isn't. Since I want the change to be local anyway, how would I restore the defaults?
\documentclass[oneside,fontsize=12pt]{scrbook}
\usepackage{fontawesome}
\usepackage{expl3}
\usepackage{xparse}
\usepackage{hyperref}
%\usepackage{hyperref}
\NewDocumentCommand{\thisfbshare}{}{\href{https://www.facebook.com/sharer/sharer.php}{\faFacebookSquare}}
\NewDocumentCommand{\thistwshare}{}{\href{http://foo.com/?share=twitter\&nb=1}{\faTwitterSquare}}
\NewDocumentCommand{\thisshare}{}{\thisfbshare\thistwshare}
\begin{document}
%https://tex.stackexchange.com/questions/823/remove-ugly-borders-around-clickable-cross-references-and-hyperlinks
% SOL # 1
\hypersetup{hidelinks}
\hypersetup{
colorlinks = true, %Colours links instead of ugly boxes
urlcolor = blue, %Colour for external hyperlinks
linkcolor = blue, %Colour of internal links
citecolor = red %Colour of citations
}
% SOL # 2
%\hypersetup{
% colorlinks=false,
% pdfborder={0 0 0},
%}
{\large Don't forget to share on \thisshare~for \href{http://foo.com}{foo}}
%HOW TO RESTORE?
\end{document}
PS: the surrounding boxes for FB and Tw would be just fine if they didn't overlap with each other.