For Firefox Chickenfoot users

Hello.

 

So this is going back to the topic someone mentioned a while back about the right navigation bar being too busy, flashing, taking up room, etc.  I wrote the script below for the Firefox Chickenfoot extension.  This script will place two new hyperlinks on the top navigation menu: "Right" and "Left".

Clicking these will hide/show the right and left navigation bars, giving you more room to read/work.

This script also removes the horizontal scroll bar that shows up in the editor screen when you're trying to make a post or reply.

Enjoy!

 

// ==UserScript==
// @name SiglerSiteFix
// @when Pages Match
// @includes *scottsigler.com/*
// @by ext237
// ==/UserScript==
function $(v) {
try {
if (v!=null)
if (document.getElementById(v)) return document.getElementById(v)
else return false;
} catch(e) {
return false;
}
}
function h(v) {
if (v!=null) {
var targ = null;
if (v['target']['name'] == 'rightBtn') targ='right';
else targ='left';
if ($(targ).style.display=='none') {
$(targ).style.display='block'
if (targ=='right') $('center').style.marginRight='210px'
else $('center').style.marginLeft='210px'
} else {
$(targ).style.display='none'
if (targ=='right') $('center').style.marginRight='0px'
else $('center').style.marginLeft='0px'
}
}
}
var menu = $('nice-menu-1')
var Btn = document.createElement('a');
Btn.addEventListener('click', h, false);
Btn.name = 'rightBtn';
Btn.appendChild(document.createTextNode('Right') );
var rightLI = document.createElement('li');
rightLI.className = 'menuparent menu-path-node-00';
rightLI.appendChild(Btn);
menu.appendChild(rightLI);
var Btn = document.createElement('a');
Btn.addEventListener('click', h, false);
Btn.name = 'leftBtn';
Btn.appendChild(document.createTextNode('Left') );
var leftLI = document.createElement('li');
leftLI.className = 'menuparent menu-path-node-00';
leftLI.appendChild(Btn);
menu.appendChild(leftLI);
if ($('mce_editor_0')!=false)
{
var e = $('mce_editor_0').contentDocument;
var eb = e.body;
eb.style.minWidth='0';
}

 

cool thing bout firefox

jtswambo's picture

bookmark siggz home-page (or another site like u-tube) and drag the bookmark into the bar under the addressbar and you have a quick-link to any web page you want Laughing

 

what's wrong with a bit of senseless violence to a lemming?

they're only going to walk off a cliff.


Very cool!

pulsar's picture

This is indeed very useful, I'll have a look if I can adapt this feature using jQuery only.

I was also thinking about implementing this site theme once again based on one of the more recent ZEN themes, this one would allow dynamic sidebars without tinkering the margin sizes. 

Cheers!
Pau.


Rather than recycling

ext237's picture

Rather than recycling someone else's work ... there's drupal developers out there who'd love a shot at developing a sweet theme for scottsigler.com.  ;-)

 

 


recycling?

pulsar's picture

Here is what Zen's description says:

Zen is the ultimate starting theme for Drupal. If you are building your own standards-compliant theme, you will find it much easier to start with Zen than to start with Garland or Bluemarine. This theme has fantastic online documentation and tons of code comments for both the PHP (template.php) and HTML (page.tpl.php, node.tpl.php).

It is not like this would be my first theme I adapted for drupal. Right now there are very few good boilerplate templates. Zen is definitely one of these.

Cheers!
Paul.


Oh man, you gotta start from

ext237's picture

Oh man, you gotta start from scratch! Make it a completely original work. Creating a theme starting with completely blank php files is the best way to flex your skills!

 

It also makes attribution less cumbersome. So when you're showing your portfolio, you can say that you designed the work ... rather than "oh, I took someone else's design and modified it."


Dude!

pulsar's picture

If i were about flexing my skills I would rather go freeclimbing or something. Look, I develop all day and night, usualy stuff in Java or .NET (Currently a lot of custom development for the Microsoft Sharepoint Server). Flexing my skills in PHP? Don't make me laugh :D It is about 5 years ago I finished my last PHP project. Started developing PHP using PHP 2 btw. I REALLY had enough of it.

Why should I waste my free time reinventing the wheel? Open source is meant to avoid such timeburners.

Sorry, could not resist :)

Cheers!
Paul.


Obsolete?? Did you try applying it to see what it does?

ext237's picture
I wouldn't have spent 30 minutes writing it if it was obsolete.

and how does one apply this script?

Pjotr NL's picture

I have installed this chickenfoot and now what???

[1st Dutch junkie] All that matters is getting my fix.


Are you ready?

JP's picture
Now cast your chickenfeet, some dice and a few bones on the table, next to the drippy candle and scull. Don't let the cat jump up there and steal any of your chicken leftovers--they still smell like chicken, even after a good boiling. Say all the appropriate gibberish, and be sure to make it sound either Cajun or Caribbean. Once you do all this, well, then I guess you've done it. Now grab a cup of coffee, that sweet gal by your side, and go do something that's not obsolete.

 

 

- Verveces tui similes pro ientaculo mihi appositi sunt. (I have jerks like you for breakfast.)


Yeeah, I'll have whatever JP

ext237's picture
Yeeah, I'll have whatever JP is drinking.

that would be gin

Pjotr NL's picture

 -

[1st Dutch junkie] All that matters is getting my fix.


Indeed...

JP's picture
it would be gin: the preferred adult beverage in the Rookie Universe...and mine! (We're also always malaria-free!)

 

 

- Verveces tui similes pro ientaculo mihi appositi sunt. (I have jerks like you for breakfast.)


Martini

Shadygirl's picture
Nothing like a good gin martini, except maybe a good gin and tonic!

"I'm going to show him what a little girls made of, gunpowder and lead" - Miranda Lambert


i got it to work

Pjotr NL's picture

cool. Sorry I take it back with the whole obsolete thing.but do i have to run the script everytime I refresh a window or when I post a comment and go back to the thread?

[1st Dutch junkie] All that matters is getting my fix.


welcome to chickenfoot

ext237's picture

So now, paste in the script into your chickenfoot window and then click the "Triggers" tab.

 

You'll see a "Plus" sign.  Click there to create a new trigger with this script.

 

 In the section that says "when pages match:"  type in "*scottsigler.com/*" (without the quotes!).

 

Every time you visit a scottsigler page, you'll get the new links and the issue with the editor goes away.  :-))

 

Chickenfoot lets you rule the world(wide web).  I have scripts for digg and google that gets rid of ads and lets you open a bunch of google search results all at one time. 


well

Pjotr NL's picture

it's a bit obsolete now since we can now manually close the boxes.

And BTW i don't understand a single thing of what you typed below: Enjoy!

[1st Dutch junkie] All that matters is getting my fix.


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <vspace> <hspace> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <span> <center> <div> <p> <br> <b> <i> <u>
  • You can display your Xbox Live Gamertag by typing [gamertag:id]
  • Insert Flickr images: [flickr-photo:id=230452326,size=s] or [flickr-photoset:id=72157594262419167,size=m].

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Syndicate content