Welcome to Dream.In.Code
Become an Expert!

Join 149,530 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,506 people online right now. Registration is fast and FREE... Join Now!




greasyDIC

 
Reply to this topicStart new topic

greasyDIC, v0.1

snoj
9 Jun, 2007 - 12:46 PM
Post #1

Fell off the face of the earth
Group Icon

Joined: 31 Mar, 2003
Posts: 3,325



Thanked: 9 times
Dream Kudos: 750
My Contributions
I'm not sure how the rest of you feel about GreaseMonkey, but I'm am a fan of it.

So I've whipped up this nice little script for DIC.

Features:
  • Adds an always viewable Member Panel


Download history:
User is online!Profile CardPM
+Quote Post

William_Wilson
RE: GreasyDIC
9 Jun, 2007 - 12:50 PM
Post #2

lost in compilation
Group Icon

Joined: 23 Dec, 2005
Posts: 4,101



Thanked: 25 times
Dream Kudos: 3275
Expert In: Java, C, Javascript

My Contributions
sweet!
Grease Monkey comes in handy with scripts like these all the time smile.gif


I wrote a few scripts for it a while back, but sadly i seem to have misplaced them...
User is offlineProfile CardPM
+Quote Post

Amadeus
RE: GreasyDIC
9 Jun, 2007 - 06:49 PM
Post #3

g++ -o drink whiskey.cpp
Group Icon

Joined: 12 Jul, 2002
Posts: 12,349



Thanked: 51 times
Dream Kudos: 25
My Contributions
Nice Josh! thanks for sharing!
User is online!Profile CardPM
+Quote Post

William_Wilson
RE: GreasyDIC
12 Jun, 2007 - 09:30 AM
Post #4

lost in compilation
Group Icon

Joined: 23 Dec, 2005
Posts: 4,101



Thanked: 25 times
Dream Kudos: 3275
Expert In: Java, C, Javascript

My Contributions
hope you don't mind if i edit it a little:
CODE

function __dicLoad() {
    var clone  = document.getElementById("login").getElementsByTagName("div")[0].cloneNode(true);
    var target = document.getElementById("search");    

    //adjust menu display (font)
    var elem   = document.createElement("br");
    var node   = document.createElement("div");
    node.setAttribute('style', 'font-size:12px;');
    node.appendChild(elem);
    node.appendChild(clone);

    //add menu: (after search)
    target.insertBefore(node,target.nextSibling());
}
__dicLoad();


I like the search menu above the member panel, and it forces a nice 12px font like the actual drop down instead of the over sized fony i was having before.

I also added a br spacer at the top to clean up the implementation smile.gif
User is offlineProfile CardPM
+Quote Post

William_Wilson
RE: GreasyDIC
12 Jun, 2007 - 12:41 PM
Post #5

lost in compilation
Group Icon

Joined: 23 Dec, 2005
Posts: 4,101



Thanked: 25 times
Dream Kudos: 3275
Expert In: Java, C, Javascript

My Contributions
in the spirit of grease monkey, and those who continually complain about not having recent posts on the home/main page. This script is used on the main page and displays only new posts, nothing else on the middle column of the main page, enjoy.

CODE


function __recent_home()
{
    var nodel3 = document.getElementsByTagName("table")[1].getElementsByTagName("tbody")[0].getElementsByTagName("tr")[0];
    var nodel4 = nodel3.getElementsByTagName("td")[1];
    var nodel9 = nodel4.getElementsByTagName("span")[0].getElementsByTagName("table")[3].getElementsByTagName("tbody")[0].getElementsByTagName("tr")[0].getElementsByTagName("td")[0];
    var footer = document.getElementById("copyright");
    var node   = document.createElement("span");

    node.setAttribute("style", "font-size:12px; padding:10px;");

    nodel9.getElementsByTagName("div")[1].setAttribute('style', 'height:100%');

    node.appendChild(nodel9);
    node.appendChild(document.createElement("br"));
    node.appendChild(document.createElement("br"));
    node.appendChild(footer);

    nodel3.replaceChild(node,nodel4);
}
__recent_home();

save as recentposts.user.js or whatever you like, import into grease monkey from the main page.
User is offlineProfile CardPM
+Quote Post

capty99
RE: GreasyDIC
12 Jun, 2007 - 01:39 PM
Post #6

the real kya
Group Icon

Joined: 26 Apr, 2001
Posts: 9,252



Thanked: 16 times
Dream Kudos: 550
My Contributions
i had a dic script, the new version messed it up,
it got rid of ads so i didn't distribute.
User is offlineProfile CardPM
+Quote Post

William_Wilson
RE: GreasyDIC
12 Jun, 2007 - 02:33 PM
Post #7

lost in compilation
Group Icon

Joined: 23 Dec, 2005
Posts: 4,101



Thanked: 25 times
Dream Kudos: 3275
Expert In: Java, C, Javascript

My Contributions
you have a DIC++, why do you see ads? or is that a you "did see ads"?

I had forgotten how much fun this thing was, currently writing a gm code to fix the icons, adds, and fonts in the blog section.
User is offlineProfile CardPM
+Quote Post

skyhawk133
RE: GreasyDIC
12 Jun, 2007 - 08:29 PM
Post #8

Head DIC Head
Group Icon

Joined: 17 Mar, 2001
Posts: 15,262



Thanked: 61 times
Dream Kudos: 1650
Expert In: Web Development

My Contributions
If you can actually fix that shit in a way I can implement, I'll fix it permanently. smile.gif
User is offlineProfile CardPM
+Quote Post

William_Wilson
RE: GreasyDIC
13 Jun, 2007 - 04:34 PM
Post #9

lost in compilation
Group Icon

Joined: 23 Dec, 2005
Posts: 4,101



Thanked: 25 times
Dream Kudos: 3275
Expert In: Java, C, Javascript

My Contributions
well my fix will depend on ids, but i will see if i can get one that works for all pages/columns, shouldn't be too hard. I have the ads removed, that was easy, and the menus are done and done, if it was implemented as real js, the member panel would work properly as well (gmokey cannot find js functions in the page consistently).
The only issue i have is ensuring all panels have proper font, but i will see what i can do, i have most of them working just fine.
User is offlineProfile CardPM
+Quote Post

snoj
RE: GreasyDIC
13 Jun, 2007 - 04:50 PM
Post #10

Fell off the face of the earth
Group Icon

Joined: 31 Mar, 2003
Posts: 3,325



Thanked: 9 times
Dream Kudos: 750
My Contributions
I think he means the PHP code William.
User is online!Profile CardPM
+Quote Post

William_Wilson
RE: GreasyDIC
13 Jun, 2007 - 04:58 PM
Post #11

lost in compilation
Group Icon

Joined: 23 Dec, 2005
Posts: 4,101



Thanked: 25 times
Dream Kudos: 3275
Expert In: Java, C, Javascript

My Contributions
it would take a little work to switch it to php, but the script in gm works for all blogs, fixing fonts,adds,and menus, without changing any other settings.

I know the member panel code is located in the blog pages, even though the member panel link is not available, so some of the js may be re-useable.

What exactly are you looking for Chris, i'd be glad to do my best (meaning do it till i die or cry) to fix it up, for ya.
quick questions:
how do you want the code written?
can i see the source to have a better idea what i'm working with?
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/7/09 08:56PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month