All girls have been there, but, unfortunately, some of us have been there more than others. The fact is, there are just some girls who have boy drama ALL THE TIME. Yes, most of those people put it on themselves, but others just have bad luck. So, whether you are a constant experiencer of dude related drama, or if you are just in a current and temporary state of “meh” when it comes to guys, I have compiled a list of songs to help you whatever your situation may be. These are songs that have helped me in the past, and I hope that the beautiful melodies and heart-hitting lyrics help you as well.
Sorry that most of them are by the same artist.
For the girl that misses an ex – “I Miss Missing You” by Fall Out Boy
“Baby, you were my picket fence. I miss missing you now and then.”
For the girl who likes someone with a girlfriend – “You Belong With Me” by Taylor Swift
“Can’t you see that I’m the one who understands you? Been here all along, so why can’t you see you belong with me?”
For the girl who was cheated on – “You Lost Me” by Christina Aguilera
“I feel like our world’s been infected, and somehow you left me neglected. We’ve found our lives have been changed. Babe, you lost me…”
For the girl who is finally over him – “Since U Been Gone” by Kelly Clarkson
“Since you’ve been gone I can breathe for the first time. I’m so moving on, yeah, yeah…”
For the girl who misses a boyfriend who is long distance – “A Thousand Miles” by Vanessa Carlton
“I would walk 1,000 miles if I could just see you tonight.” – a classic!
For the girl who finally walked away from a toxic relationship – “Happily Never After” by The Pussycat Dolls
“I know I deserve better, after all. I’ll never let another teardrop fall.” – This one is SUPER personal to me. I listened to it a lot after my last relationship ended. It’s super liberating when you realize that the lyrics apply perfectly to walking away to something that was bad for you.
For the girl who likes someone that her friends don’t approve of – “Bleeding Love” by Leona Lewis
“I don’t care what they say – I’m in love with you. They try to pull me away, but they don’t know the truth.”
For the girl who likes girls – “Boys and Girls” by “Panic! At the Disco
“Girls love girls and boys, and love is not a choice.”
…and, you’re welcome for the video. It’s wonderful.
For the girl who is jealous of his new girlfriend – “Hotel Paper” by Michelle Branch
“I wanted to be giving you everything she’s not giving.” – Another one that is super personal to me. If you just wish you were in her shoes, this song is perfect for you!
For the girl who has been friend zoned – “Bad Romance” by Lady Gaga
“I want your love. I don’t wanna be friends.”
For the girl who fell for a fuck boy – “Take a Bow” by Rihanna
“You put on quite a show, really had been going. But, now it’s time to go – curtain’s finally closing. That was quite a show, very entertaining. But it’s over now. Go on and take a bow.”
For the girl who is in a relationship that is ending – “The Truth” by Kris Allen
“While the floors underneath our feet are crumblin’, the walls we built together tumblin’ — I still stand here holding up the roof, ‘casue it’s easier than telling the truth.”
For the girl who is lusting after someone – “Get Mine, Get Yours” by Christina Aguilera
“Now, I don’t mind us being some kind of casual thing. Listen, all I want to do for now is have you come and take all of me.”
For the girl who likes someone who doesn’t like them back – “You Don’t See Me” from Josie and the Pussycats
“You don’t see me, and you don’t need me, and you don’t love me the way I wish you would – the way I know you could.”
For the girl who broke up with him – “Goodbye to You” by Michelle Branch
“Goodbye to you. Goodbye to everything that I knew. You were the one I loved, the one thing that I tried to hold on to.”
For the girl who is going through a break up – “Dreaming with a Broken Heart” by John Mayer
“When you’re dreaming with a broken heart waking up is the hardest part.”
For the girl who is interested in someone new – “Dreaming of You” by Selena
“There is nowhere in the world I’d rather be than here in my room dreaming about you and me.”
You can’t also opt for the version by Dream Street, but, I mean… it’s Selena…
For the girl who doesn’t care about boys and just wants to love herself – “I Don’t Need a Man” by The Pussycat Dolls
“I don’t need a man to make me feel good, I get off doing my thing.”
For the girl who just consistantly has guy problems – “Bad at Love” by Halsey
From Your Site Articles
Related Articles Around the Web
window.REBELMOUSE_LOWEST_TASKS_QUEUE.push(function(){
var scope = {};
var $searchButton = document.querySelector('.search-bar-container .open-search-bar'), $closeButton = document.querySelector('.search-bar-container .close-search-bar'), $searchBarContainer = document.querySelector('.search-bar-container'), $searchInput = document.querySelector('.search-bar-container .search-widget__input'), $searchForm = document.querySelector('.search-bar-container form');
$searchButton.addEventListener('click', function(e){ e.preventDefault(); $searchBarContainer.classList.add('active');
$closeButton.style.display = 'block'; $searchButton.style.display = 'none'; });
$closeButton.addEventListener('click', function(e){ e.preventDefault(); $searchBarContainer.classList.remove('active');
$searchButton.style.display = 'block'; $closeButton.style.display = 'none'; });
$searchInput.addEventListener('keydown', function (e) { if (e.code === 13) { $searchForm.submit(); return false; } });
});
window.REBELMOUSE_LOWEST_TASKS_QUEUE.push(function(){
var formToJSON = function(form){ var fData = new FormData(form); var obj = {};
fData.forEach(function(value, key){ obj[key] = value; });
return obj; };
var objectToQueryString = function(params){ return Object.keys(params).map(function(key){return encodeURIComponent(key) + '=' + encodeURIComponent(params[key])}).join('&'); };
var isEmail = function(email){ var regex = /^([a-zA-Z0-9_.+-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$/; return regex.test(email); };
var register = function(form){
let url = form.action; let options = {}; let body = formToJSON(form);
url = url.replace(/?$/, '') + "newslettercb&" + objectToQueryString(body);
if(!('newslettercb' in window)){ window.newslettercb = function(data){ let failureElement = form.querySelector('.newsletter-failure');
if (data.result !== "success") { console.log('error: ' + data.msg); if ((data.msg.match("Click here to update your profile.$")) || (data.msg.match("^Recipient"))) { failureElement.innerText('You are already subscribed.'); failureElement.classList.remove('hidden'); } return; }
form.querySelector('.newsletter-failure').classList.add('hidden'); form.querySelector('#newsletter-email').classList.add('hidden'); form.querySelector('#newsletter-submit-button').classList.add('hidden'); form.querySelector('.newsletter-success').classList.remove('hidden'); } }
let script = document.createElement("script"); script.src = url; script.async = true; document.head.appendChild(script); };
var onButtonClick = function(event){ event.preventDefault();
let form = this.closest('form'); let inputField = form.querySelector('#newsletter-email');
var enteredEmail = inputField.value; if ( isEmail(enteredEmail) ) { register(form); } else { form.querySelector('.newsletter-failure').classList.remove('hidden'); } };
document.querySelectorAll('form.newsletter').forEach(function(form){ let button = form.querySelector('[type="submit"]');
if(!button) return;
console.log("scope1", form); button.addEventListener('click', onButtonClick); });
});
window.REBELMOUSE_LOWEST_TASKS_QUEUE.push(function(){
let parag = document.querySelectorAll('.post-bottom .body-description p'); parag.forEach((item, index) => { if(index == 2){ let parent = item.parentNode; let disDiv = document.createElement("div"); disDiv.classList.add("distroscale_p2"); disDiv.style.height = "330px"; disDiv.style.width = "100%"; parent.insertBefore(disDiv, item); } })
});
window.REBELMOUSE_LOWEST_TASKS_QUEUE.push(function(){
document.querySelectorAll(".viewport-css-anchor").forEach(function(element){ if(window.scrollY < (element.offsetTop + element.offsetHeight)) return; var style = element.getAttribute('data-id'); document.getElementById(style).setAttribute('media', 'screen'); }); }); window.REBELMOUSE_LOWEST_TASKS_QUEUE.push(function(){ window.REBELMOUSE_STDLIB.loadExternalScript("//js.hsforms.net/forms/v2.js", function() { hbspt.forms.create({ portalId: "4526177", target: '#hubspot-form', formId: "6b1e50fe-b7ee-440b-8a34-d0f42a900ac9" }); }); }); window.REBELMOUSE_LOWEST_TASKS_QUEUE.push(function(){ REBELMOUSE_STDLIB.onElementInViewport({ threshold: 400, selector: ".sidebar_sticky_parent", oneTime: true, onIntersect: function(entry){ var element = entry.target; var ad_el=element.querySelector(".sidebar_repeat_ad"); ad_el .classList.add("rblad-sidebar_3"); element.insertAdjacentHTML( "afterend", '
' ); } });
});
window.REBELMOUSE_LOWEST_TASKS_QUEUE.push(function(){
window.REBELMOUSE_STDLIB.loadExternalScript("https://connect.facebook.net/en_US/sdk.js", function() {
});
});
window.REBELMOUSE_LOWEST_TASKS_QUEUE.push(function(){
/*! * clipboard.js v1.5.3 * https://zenorocha.github.io/clipboard.js * * Licensed MIT © Zeno Rocha */ !function
var clipboard = new Clipboard('.js--copytext'), animationClass="button--copytext-animation", timer;
clipboard.on('success', function(event) { var btn = event.trigger;
btn.classList.remove(animationClass); void event.trigger.offsetWidth; // see https://css-tricks.com/restart-css-animation/#article-header-id-0 btn.classList.add(animationClass); clearTimeout(timer); timer = setTimeout(function(){ btn.classList.remove(animationClass); },1500); console.info("Copied text to clipboard: " + event.text); });
});
window.REBELMOUSE_LOWEST_TASKS_QUEUE.push(function(){
var beautifyViews=n=>((Math.log10(n)/3|0)==0)?n:Number((n/Math.pow(10,(Math.log10(n)/3|0)*3)).toFixed(1))+["","k","M","B","T",][Math.log10(n)/3|0];
var _postViewsElem = document.querySelector('.page-views');
if (_postViewsElem!==null){ var _postViews = parseInt(_postViewsElem.textContent); _postViewsElem.textContent = beautifyViews(_postViews); }
var clipboard = new Clipboard('.js--copytext'), animationClass="button--copytext-animation", timer;
clipboard.on('success', function(event) { var $btn = event.trigger;
$btn.classList.remove(animationClass); void event.trigger.offsetWidth; // see https://css-tricks.com/restart-css-animation/#article-header-id-0 $btn.classList.add(animationClass); clearTimeout(timer); timer = setTimeout(function(){ $btn.classList.remove(animationClass); },1500); console.info("Copied text to clipboard: " + event.text); });
var tagNameItem = document.querySelector('.post-partial .article-primary-tag'); if (tagNameItem) { var tagNameValue = tagNameItem.innerHTML; if (tagNameValue.indexOf('-')) { tagNameItem.innerHTML = tagNameValue.split('-').join(' '); tagNameItem.classList.remove("hidden"); } }
});
window.REBELMOUSE_LOWEST_TASKS_QUEUE.push(function(){
var body = document.querySelector('body'), dialogOpen = 'data-target-dialog', dialogClose="js--close-fullscreen-dialog";
function closeDialog () { document.querySelectorAll('.is--active').forEach(function(element){ element.classList.remove('is--active'); }); body.classList.remove('fullscreen-dialog-open'); }
function openDialog (dialog) { document.querySelectorAll('.is--active').forEach(function(el){ el.classList.remove('is--active'); }); dialog.classList.add('is--active'); body.classList.add('fullscreen-dialog-open'); }
var openClick = function(event){
event.stopPropagation(); event.preventDefault();
var target = this.getAttribute(dialogOpen); var targetID = target;
if(target[0] !== '.' && target[0] !== '#'){ targetID = "#"+targetID; }
var dialog = document.querySelector(targetID);
// Facebook Comments dialog if ( event.target.getAttribute('data-facebook-comments-url') ) { openDialog (dialog);
var url = event.target.getAttribute('data-facebook-comments-url'); var container = dialog.querySelector('.fbc__container'); if(container){ container.innerHTML = '
'; } FB.XFBML.parse( document.getElementById(target) ); }
// Avatar window else if( event.target.getAttribute('data-avatar') ) { var imgurl = event.target.getAttribute('data-avatar');
if( imgurl.indexOf('res/avatars/default') == -1 ) {
openDialog(dialog);
var container2 = dialog.querySelector('.fullscreen-dialog__img-container');
if(container2){
container2.innerHTML = '';
}
}
}
else { openDialog (dialog); } };
var closeClick = function(event){ closeDialog(); event.stopPropagation(); event.preventDefault(); };
document.querySelectorAll('['+dialogOpen+']').forEach(function(element){ element.addEventListener('click', openClick); });
document.querySelectorAll('.'+dialogClose).forEach(function(element){ element.addEventListener('click', closeClick); });
body.addEventListener('click', function(event){ var target = this;
if(target.getAttribute(dialogOpen)){ openClick(event); return; }
if(target.classList.contains(dialogClose)){ closeClick(event); return; } });
});
window.REBELMOUSE_LOWEST_TASKS_QUEUE.push(function(){
/*var onClick = function(event){ var articleCt = this.parentNode; articleCt.classList.toggle('article__body--expanded');
if(window.REBELMOUSE_STDLIB.getDevice() === 'mobile'){ var event = new CustomEvent("article-expanded", articleCt.closest('.widget')); window.dispatchEvent(event); } this.remove(); event.stopPropagation(); event.preventDefault(); };
var onElement = function(element){ element.addEventListener('click', onClick); };
document.querySelectorAll('.button--read-more').forEach(onElement); window.REBELMOUSE_STDLIB.createElementChangeListener('.button--read-more', onElement);*/
});
window.REBELMOUSE_LOWEST_TASKS_QUEUE.push(function(){
var sendGAevent = function(eAction, eLabel, eDimension) { var gaFields = { hitType: 'event', eventCategory: 'Impression', eventAction: eAction, eventLabel: eLabel, dimension33: eDimension, nonInteraction: true };
console.log('New NonInteraction Impression Tracked', gaFields); gtag('event', 'gtagEvents', gaFields); };
var elementsToTrack = { /*Frontpage Newsletter CTA*/ '.js--ga-impression-newsletter-cta-home': function() { sendGAevent('newsletter-cta-home', '', 'Newsletter CTA'); }, /*Postpage Creator CTA*/ '.js--ga-impression-creator-cta-content': function() { sendGAevent('creator-cta-content', '', 'Creator CTA'); }, /*Postpage First Inarticle Newsletter CTA*/ '.js--ga-impression-newsletter-cta-content': function(el) { if (el.classList.contains('js--impression-tracked')) return;
el.classList.add('js--impression-tracked');
var closest = el.closest('.article--new');
if (!closest) { sendGAevent('newsletter-cta-content', '', 'Newsletter CTA'); return; }
if (!closest.classList.contains('article--socialux')) { sendGAevent('newsletter-cta-content', '', 'Newsletter CTA'); } }, /*Frontpage Popular List*/ '.js--ga-impression-popular-list .widget': function(el) { sendGAevent('popular-list', el.querySelector('.headline__link').getAttribute('href'), 'Popular Card Item'); }, /*Frontpage Ad Slot in Popular List*/ '.js--ga-impression-popular-list-ad': function() { sendGAevent('popular-list', '', 'ad'); }, '.js--ga-impression-popular-list-content-page-one .widget': function(el) { sendGAevent('popular-list-content-page-one', el.querySelector('.headline__link').getAttribute('href'), 'Popular Card Item'); }, /*Postpage Popular List Second module*/ '.js--ga-impression-popular-list-content-page-two .widget': function(el) { sendGAevent('popular-list-content-page-two', el.querySelector('.headline__link').getAttribute('href'), 'Popular Card Item'); }, '.js--ga-impression-frontpage-post-in-section .widget': function(el) { sendGAevent(el.closest('.js--ga-impression-frontpage-post-in-section').getAttribute('data-ga-event-action'), el.querySelector('.headline__link').getAttribute('href'), 'headline'); }, /*Frontpage Ad Slots in a section*/ '.js--ga-impression-frontpage-ad-in-section': function(el) { sendGAevent(el.getAttribute('data-ga-event-action'), '', 'ad'); }, /*Postpage Newest Posts module*/ '.js--ga-impression-newest-content-page .widget': function(el) { sendGAevent('newest-content-page', el.querySelector('.headline__link').getAttribute('href'), 'headline'); }, /*Postpage First inarticle ads*/ '.ad--inarticle': function(el) { if (el.classList.contains('js--impression-tracked')) return;
el.classList.add('js--impression-tracked');
var closest = el.closest('.article--new');
if (!closest) { sendGAevent('in-read-ad', '', 'ad'); return; }
if (!closest.classList.contains('article--socialux')) { sendGAevent('in-read-ad', '', 'ad'); } }, '.js--ga-impression-discover-post .widget__body': function(el) { sendGAevent('discover', el.querySelector('.headline__link').getAttribute('href'), 'headline'); }, '.js--ga-impression-discover-ad': function() { sendGAevent('discover', '', 'ad'); }, '.js--ga-impression-trending-ad': function() { sendGAevent('trending', '', 'ad'); }, '.js--ga-impression-related-articles .widget__body': function(el) { sendGAevent('relatedArticles', el.querySelector('.headline__link').getAttribute('href'), 'headline'); }, '.js--ga-impression-popular-list-community .widget__body': function(el) { sendGAevent('popular-list-community', el.querySelector('.headline__link').getAttribute('href'), 'Related Card Item'); }, '.js--ga-impression-community-articles .widget__body': function(el) { sendGAevent('communityArticles', el.querySelector('.headline__link').getAttribute('href'), 'headline'); }, '.js--ga-impression-community-articles-ad': function() { sendGAevent('communityArticles', '', 'ad'); }, '.js--ga-impression-author-articles .widget__body': function(el) { sendGAevent('authorArticles', el.querySelector('.headline__link').getAttribute('href'), 'headline'); }, '.js--ga-impression-article-search .widget__body': function(el) { sendGAevent('articleSearch', el.querySelector('.headline__link').getAttribute('href'), 'headline'); }, '.js--ga-impression-article-search-ad': function() { sendGAevent('articleSearch', '', 'ad'); }, '.js--ga-impression-related-content .widget': function(el) { if (el.classList.contains('js--impression-tracked')) return;
el.classList.add('js--impression-tracked');
var closest = el.closest('.article--new');
if (!closest) { sendGAevent('in-read-ad', '', 'ad'); return; }
if (!closest.classList.contains('article--socialux')) { sendGAevent('related-content', el.querySelector('.headline__link').getAttribute('href'), 'Related Card Item'); } }, /*Postpage Ad Slots in Sidebar*/ '.js--ga-impression-sidebar-content-ad': function(el) { if (el.classList.contains('js--impression-tracked')) return;
el.classList.add('js--impression-tracked'); sendGAevent('sidebar', '', 'ad'); }, /*Postpage Ad Slots related content ads*/ '.js--ga-impression-related-content-ad': function(el) { if (el.classList.contains('js--impression-tracked')) return;
el.classList.add('js--impression-tracked'); sendGAevent('related-content', '', 'ad'); } };
var onIntersect = function(entry) { if (!entry.isIntersecting) return;
var target = entry.target;
Object.keys(elementsToTrack).forEach(function(query) { if (target.matches(query)) elementsToTrack[query](target); }); };
var isMatchingNode = () => true;
var addToObserver = function(selector) { window.REBELMOUSE_STDLIB.onElementInViewport({ selector, onIntersect, isMatchingNode, oneTime: true }); };
Object.keys(elementsToTrack).forEach(function(selector) { addToObserver(selector); });
window.addEventListener('rblms-featuredCreatorImpressionTrack', function(e, data) { var query = '.js--ga-impression-frontpage-featured-creator .widget'; elementsToTrack[query] = function(el) { sendGAevent(el.closest('.js--ga-impression-frontpage-featured-creator').getAttribute('data-ga-event-action'), el.querySelector('.headline__link').getAttribute('href'), 'headline'); }; addToObserver(query); });
addToObserver('.js--ga-impression-sidebar-content-ad'); addToObserver('.js--ga-impression-related-content-ad'); addToObserver('.js--ga-impression-related-content .widget');
// Track impressions from Load More cards // These events are set in their respective xml file next_page tags window.addEventListener('rblms-impressionTrack', function(e, data) { sendGAevent(data.action, data.label, data.dimension); });
window.addEventListener('popular-posts-inserted', function() { var query = '.js--ga-impression-popular-list-inarticle .widget'; elementsToTrack[query] = function(el) { sendGAevent('popular-list-inarticle', el.querySelector('.headline__link').getAttribute('href'), 'Popular Card Item'); }; addToObserver(query); });
function onKeepReadinEvent($widget){ var postUrl = $widget.querySelector('[data-post-url]').getAttribute('data-post-url');
var gaKeepReadingFields = { hitType: 'event', eventCategory: 'Click', eventAction: 'User Clicked Keep Reading', eventLabel: postUrl, dimension17: 'Mobile Keep Reading' };
console.log('Keep Reading Tracked', gaKeepReadingFields); gtag('event', 'gtagEvents', gaKeepReadingFields);
/*Postpage Inarticle Expanded Newsletter CTA*/ addToObserver('.js--ga-impression-newsletter-cta-content'); addToObserver('.ad--inarticle'); }
window.addEventListener('article-expanded', function(e, $widget) { onKeepReadinEvent($widget); });
function onJSKeepReadingClick(event){ onKeepReadinEvent(this.closest('.widget, .article__body')); }
window.REBELMOUSE_STDLIB.createElementChangeListener('.js-keep-reading', function(element){ element.addEventListener('click', onJSKeepReadingClick); });
});
window.REBELMOUSE_LOWEST_TASKS_QUEUE.push(function(){
var sendGAevent = function(gaFields) { console.log('New Event Tracked', gaFields); window.ga('send', gaFields); window.ga('b.send', gaFields); }
var trackClick = function(e){ var $t = e.target, url = $t.getAttribute('data-url') || false, eCategory = $t.getAttribute('data-event-category'), eAction = $t.getAttribute('data-event-action'), eLabel = $t.getAttribute('data-event-label'), eValue = $t.getAttribute('data-event-value'), eDimension = $t.getAttribute('data-event-dimension'), eDimensionValue = $t.getAttribute('data-event-dimension-value') || $t.closest('[data-dimension-value]').attr('data-dimension-value') || '', gaFields;
// open popup window for share buttons url && Sharer.openPopupWindow(url);
// GA formatted event data if (eCategory === 'social') { gaFields = { hitType: 'social', socialNetwork: eAction, socialAction: eLabel, socialTarget: eValue }; } else { gaFields = { hitType: 'event', eventCategory: eCategory, eventAction: eAction, eventLabel: eLabel, eventValue: eValue }; }
// Set dimension, if any if( eDimension && eDimensionValue ){ gaFields[eDimension] = decodeURIComponent(eDimensionValue); }
sendGAevent(gaFields); };
var handlerJSGATRACKelement = function(element){ element.addEventListener('click', trackClick); };
document.querySelectorAll('.js-ga-track').forEach(handlerJSGATRACKelement); if(window.REBELMOUSE_STDLIB != undefined) { window.REBELMOUSE_STDLIB.createElementChangeListener('.js-ga-track', handlerJSGATRACKelement); }
var sendFBEvents = function(){
if(!("FB" in window)) return;
window.FB.Event.subscribe('edge.create', function(url, html_element) { if( html_element.classList.contains('.js--track-likes') ) { sendGAevent({ hitType: 'event', eventCategory: 'social', eventAction: 'Facebook', eventLabel: 'like-odyssey', eventValue: window.location.href, dimension17: 'Like Odyssey on Facebook (Article Page)' }); } });
window.FB.Event.subscribe('edge.remove', function(url, html_element) { if( html_element.classList.contains('.js--track-likes') ) { sendGAevent({ hitType: 'event', eventCategory: 'social', eventAction: 'Facebook', eventLabel: 'like-odyssey', eventValue: window.location.href, dimension17: 'Unlike Odyssey on Facebook (Article Page)' }); } }); };
if(window.REBELMOUSE_STDLIB != undefined) window.REBELMOUSE_STDLIB.createElementChangeListener('#fb-root', sendFBEvents);
});
window.REBELMOUSE_LOWEST_TASKS_QUEUE.push(function(){
var searchForm = document.querySelector('.js--search-form'), searchFormTrigger = document.querySelector('.js--toggle-search-form'), searchFormInput = document.querySelector('.js--search-form-input');
if(!searchFormTrigger) return;
searchFormTrigger.addEventListener('click', function(){ searchFormInput.value=""; searchFormInput.blur(); searchForm.classList.toggle('is-active');
if(searchForm.classList.contains('is-active')){ searchFormInput.focus(); } });
var toggleClick = function(){ var parent = this.closest('.user-info__menu'); if(!parent) return;
parent.classList.toggle("user-info__menu--active");
if (!parent.classList.contains("user-info__menu--active")) return;
var offClick = function() { parent.classList.remove("user-info__menu--active"); document.removeEventListener('click', offClick); };
document.addEventListener('click', offClick); };
document.querySelectorAll('.js--toggle-user-info__menu').forEach(function(element){ element.addEventListener('click', toggleClick); });
});
window.REBELMOUSE_LOWEST_TASKS_QUEUE.push(function(){
var scope = {};
scope.scrollTop = function(){ return window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0; };
scope.previousPosition = scope.scrollTop();
scope.scroller = function(){ var scroll = scope.scrollTop();
document.body.classList.toggle('site--scrolled', scroll > 80);
document.body.classList.toggle('site--scrolled-leading', scroll > 730);
if(scroll > scope.previousPosition) { document.body.classList.add('scroll-down'); } else { document.body.classList.remove('scroll-down'); } scope.previousPosition = scroll;
if(scroll + window.innerHeight > document.body.clientHeight - 100) { document.body.classList.remove('scroll-down'); } };
scope.deferer = null;
scope.scrollListener = function(){ if(scope.deferer) clearTimeout(scope.deferer); scope.deferer = setTimeout(scope.scroller, 10); };
window.addEventListener('scroll', scope.scrollListener);
});
window.REBELMOUSE_LOWEST_TASKS_QUEUE.push(function(){
let activeLink = document.querySelector('.sidebar--sticky [href="' + window.location.pathname + '"]'); if(!activeLink) return;
let dropdownLabel = document.querySelector('.static-sidebar-label'); let ww = window.innerWidth; if( ww < 768) { // if mobile dropdownLabel.innerHTML = activeLink.text; } else if(activeLink){ activeLink.classList.add("active"); } }); window.REBELMOUSE_LOWEST_TASKS_QUEUE.push(function(){ function addEventHandler(elem, eventType, handler) { if (elem.addEventListener) elem.addEventListener (eventType, handler, false); else if (elem.attachEvent) elem.attachEvent ('on' + eventType, handler); } function hasClass(el, className) { if (el.classList) return el.classList.contains(className) else return !!el.className.match(new RegExp('(\s|^)' + className + '(\s|$)')) } function addClass(el, className) { if (el.classList) el.classList.add(className) else if (!hasClass(el, className)) el.className += " " + className } function removeClass(el, className) { if (el.classList) el.classList.remove(className) else if (hasClass(el, className)) { var reg = new RegExp('(\s|^)' + className + '(\s|$)') el.className=el.className.replace(reg, ' ') } } var tabs = document.querySelectorAll('[data-tab-target]'); for (var i = 0; i < tabs.length; i++) { addEventHandler(tabs[i], 'change', function() { var tabName = this.getAttribute('data-tab-name'), tabTargets = this.getAttribute('data-tab-target').split(','), allTabs = document.querySelectorAll('[data-tab-name="'+tabName+'"][data-tab]'); for( var i = 0; i < allTabs.length; i++ ) { addClass(allTabs[i], 'hidden'); } for( var i = 0; i < tabTargets.length; i++ ) { removeClass(document.querySelector('[data-tab-name="'+tabName+'"][data-tab="'+tabTargets[i]+'"]'), 'hidden'); } }); } }); window.REBELMOUSE_LOWEST_TASKS_QUEUE.push(function(){ var tagNameItem = document.querySelector('.article__section_v3 .article-primary-tag'); if (tagNameItem) { var tagNameValue = tagNameItem.innerHTML; if (tagNameValue.indexOf('-')) { tagNameItem.innerHTML = tagNameValue.split('-').join(' '); tagNameItem.classList.remove("hidden"); } } }); window.REBELMOUSE_LOWEST_TASKS_QUEUE.push(function(){ function sendGAevent(gaFields) { console.log('Event Tracked', gaFields); window.ga('send', gaFields); window.ga('b.send', gaFields); } document.addEventListener('click', function(event) { if (event.target.classList.contains('click-to-play-overlay')) { var t = event.target, videoSlug = t.parentNode.getAttribute('data-slug'), videoAuthor = t.parentNode.getAttribute('data-author'), videoCommunity = t.parentNode.getAttribute('data-community'); t.classList.add('hidden'); t.previousElementSibling.play(); sendGAevent({ hitType: 'event', eventCategory: 'Video', eventAction: 'Play', eventLabel: videoSlug, metric13: '1', dimension1: videoCommunity, dimension2: videoAuthor }); } }); }); .
Leave a Comment