Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name PHPFreaks Quick Links
- // @namespace phpfreaks
- // @include http://forums.phpfreaks.com/*
- // @grant none
- // ==/UserScript==
- var quick_link_button = document.createElement('li');
- quick_link_button.setAttribute('class', 'right');
- quick_link_button.innerHTML = '<a style="border-left:1px solid #015d82;margin-left:-3px;padding-left:4px;padding-right:4px;"><div style="margin-top:7px;padding-bottom:4px;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #fff;"></div></a>';
- var nav_explore = document.getElementById('nav_explore');
- nav_explore.parentNode.insertBefore(quick_link_button, nav_explore);
- nav_explore.innerHTML = nav_explore.innerHTML + '<div id="quick_links_menu" style="display:none;border:1px solid #bbbcbe;position:absolute;z-index:100;padding:5px;width:145px;height:135px;background:#fff;box-shadow:3px 3px 4px 0px #ccc;"><ul>' +
- '<li style="font-size:11px;padding-top:7px;padding-bottom:6px;border-bottom:1px solid #edf0f5;"><a style="background:none !important;color:#0087BE;" href="http://forums.phpfreaks.com/index.php?app=core&module=search&do=viewNewContent&search_app=forums&search_app_filters[forums][searchInKey]=&change=1&period=lastvisit&followedItemsOnly=0&userMode=all">Items I Participated In</a></li>' +
- '<li style="font-size:11px;padding-top:7px;padding-bottom:6px;border-bottom:1px solid #edf0f5;"><a style="background:none !important;color:#0087BE;" href="http://forums.phpfreaks.com/index.php?app=core&module=search&do=viewNewContent&search_app=forums&search_app_filters[forums][searchInKey]=&change=1&period=lastvisit&followedItemsOnly=0&userMode=title">Items I Started</a></li>' +
- '<li style="font-size:11px;padding-top:7px;padding-bottom:6px;border-bottom:1px solid #edf0f5;"><a style="background:none !important;color:#0087BE;" href="http://forums.phpfreaks.com/index.php?app=core&module=search&do=viewNewContent&search_app=forums&search_app_filters[forums][searchInKey]=&change=1&period=lastvisit&userMode=&followedItemsOnly=1">Items I Follow</a></li>' +
- '<li style="font-size:11px;padding-top:7px;padding-bottom:6px;border-bottom:1px solid #edf0f5;"><a style="background:none !important;color:#0087BE;" href="http://forums.phpfreaks.com/index.php?app=core&module=search&do=viewNewContent&search_app=forums&search_app_filters[forums][searchInKey]=&change=1&period=lastvisit&userMode=&followedItemsOnly=0">New Since Last Visit</a></li>' +
- '<li style="font-size:11px;padding-top:7px;padding-bottom:6px;border-bottom:1px solid #edf0f5;"><a style="background:none !important;color:#0087BE;" href="http://forums.phpfreaks.com/index.php?app=core&module=search&do=viewNewContent&search_app=forums&search_app_filters[forums][searchInKey]=&change=1&period=unread&userMode=&followedItemsOnly=0">Content I Have Not Read</a></li>' +
- '</ul></div>';
- quick_link_button.addEventListener('click', toggle_quick_links, false);
- function toggle_quick_links()
- {
- var el = document.getElementById('quick_links_menu');
- if (el.style.display == 'none') {
- el.style.display = 'block';
- } else {
- el.style.display = 'none';
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement