daily pastebin goal
37%
SHARE
TWEET

Untitled

a guest Mar 19th, 2019 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function() {
  2.   var el = {{Click Element}};
  3.   var title;
  4.  
  5.   while (el.className.indexOf('class-name-here') === -1 && el.tagName !== 'BODY') {
  6.     el = el.parentElement;
  7.   }
  8.  
  9.   title = el.className.indexOf('class-name-here') > -1 ? el.querySelector('h5') : undefined;
  10.  
  11.   return title ? title.textContent || title.innerText : undefined;
  12. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top