FIMFiction UserScripts 383 members · 0 stories
Comments ( 121 )
  • Viewing 1 - 50 of 121
Selbi
Group Admin

If you have any wishes or thoughts you want to share on script ideas, post them here.

2326589
Thanks for telling us how to fix fimfiction to start off with. Well, now that I know of tampermonkey I'm trying to learn how to write code, It's slowly making sense. Also for anyone who wants to apply a custom background to the site.
body.style.backgroundImage = 'url(http://www.fimfiction-static.net/themes/poni2.0/images/body_background.png)';
Find an image you like, get the pic in its own separate tab. Delte the stuff inside the () then copy the url and paste it in the line of code above after 'url(. Then hit save, boom custom background. Just wanted to share. :twilightsmile:

2326655 Whenever I try to save it, it always says that it's an invalid script. Here's the image that I'm trying to use.

2327044

Did you make sure not to delete anything else except the stuff in the middle of the ()?

2327106

no, it should be like this.
body.style.backgroundImage = 'url(http://31.media.tumblr.com/2ba1eee9606182118d08948f01a50ab3/tumblr_mox9oaY2zv1svckxho5_1280.png)';
Sorry, my bad forgot to put the delete part.

2327113 It's still not saving. Do I have an older version of Tampermonkey?
I have v.3.5.3630.77.

// ==UserScript==
// @name Other Background
// @namespace Selbi
// @include http*://www.fimfiction.net/*
// @version 1
// ==/UserScript==

var body = document.getElementsByTagName('body')[0];
body.style.backgroundImage = 'url(http://31.media.tumblr.com/2ba1eee9606182118d08948f01a50ab3/tumblr_mox9oaY2zv1svckxho5_1280.png)';
body.style.backgroundColor = "#000000";

copy paste that. Make sure that at the end off every line after the // ==/UserScript==, the line ends with ;

2327149 It's working now. Thanks!:twilightsmile:

2327162

You're welcome! Glad we solved the problem.

ssokolow
Group Contributor

Generally speaking, I'm pretty happy with FiMFiction. Aside from the odd bug here or there (and "Show Like/Dislike Percentage" and "Remaining Words" which I didn't know I wanted), the only things I'd like to see are:

1. This group having a clear policy and guide encouraging novices to post their scripts either on Userscripts.org or, if they don't feel they're suitable, on a pastebin like Github Gist which makes it possible to trigger the install dialog without having to copy-paste and supports collaboration.

2. A script which uses XMLHttpRequest to retrieve and cache my faves list and then adds a "Hide/Show Faved Stories" toggle to results lists. (Skipping over fics I've already read quickly becomes the biggest drag on finding new stuff whenever I've been on a site for a while)

3. A script which completely revamps the search UI with complex client-side filtering options like "(Changelings OR Queen Chrysalis) AND NOT Tragedy AND 5000 < length < 150000", is compatible with #2, and has the option to use XMLHttpRequest to request additional pages until the filtered result list is at least as long as the unfiltered one would have been.

I'll get around to the latter two eventually (and #3 will end up being written in a general fashion that can easily be extended to support many different fic sites) but I thought I'd mention them in case anyone else gets the urge to beat me to it.

I'm mostly hoping to be able to learn something from all of this. I am now deeply interested in Javascript (something I had only considered in passing thought as "Oh, hey. That would be kinda nice to know." before). Though, the two current challenges I'm facing are: not knowing any Javascript (or anything having to do with object oriented anything. Seriously, the procedural programming paradigm is where I've been stuck at), and not being able to think of anything I'd change or add to the site. I'm one of those people that doesn't complain much or ask for anything in particular. This makes it difficult to come up with things to improve from what I've seen for my 70 weeks on the site as a decent set up. Plus, I don't exactly know the extent to which I can modify things with userscripts. I mean, what can I NOT do with userscripts?

ssokolow
Group Contributor

2328065

Userscripts can do:
1. Anything a site's Javascript can do (including retrieving new content from the same server like GMail and friends do)
2. Additional stuff that Greasemonkey and similar tools allow to bring you closer to what browser extensions can do. (such as bypassing the "only this site and other sites which grant permission" security restriction on making HTTP requests to retrieve or submit data)

It's less a question of "what can't userscripts do?" and more a question of "How complicated would this be, is it tricky to do in the browser without slowing down page loading, and would gathering the necessary data require loading many pages at the risk of getting banned for abuse?"

For example, you can write a userscript which shows estimates of the number of comments on each story in a search results list, but the results list doesn't say anything about that so you'd have to load each story page to get a count of the comment pages... and that'd mean that, for a collapsed result view, your script might make up to 200 extra HTTP requests to the FIMFiction servers for every results page you load.

2328356 Ah. Well, thanks for the reply. :twilightsmile:

Now all I need to do is learn to write Javascript. Luckily I just found out Dreamweaver can not only provide an IDE-like setup for doing that, I could do a lot of other things with it, too. This is going to be fun.:pinkiehappy:

ssokolow
Group Contributor

2328737

Two tips:

First, in Firefox or Chrome, press Ctrl+Shift+i (or dig through the menu) to open the developer tools for the current
page. They're a huge help and very versatile. (Other browsers have 'em too but I don't know if the keyboard shortcut is the same)

To experimentally execute Javascript in the context of the current page, you can use the console but I recommend the Firefox-only "Scratchpad" window. (Shift+F4 or press the appropriate toolbar button in the developer tools)

Note: Pressing "Display" twice in a row will have different results for the second run because the first run will select what it inserts and the second run will only execute the selected text.

Second, here are some resources for learning JavaScript:
* Mozilla Developer Network's JavaScript Guide
* Eloquent JavaScript
* Crockford's JavaScript
* jQuery Fundamentals
* Essential JavaScript & jQuery Design Patterns for Beginners

Source: the JavaScript section of Become A Programmer, Motherf***er! (An excellent site with an unfortunately crude name)

I'm not sure how much focus those put on the DOM (Document Object Model) but you'll want to understand that too as it's how the structure of the current page is exposed to JavaScript for modification.

arcum42
Group Admin

2326589

One that I'd personally find useful is a fairly specialized script. Basically, if you click on a notification for someone replying to one of your comments in a thread, I'd like the page to immediately reload itself.

You see, there's a bug where the first time you go to a thread after someone replies to one of your comments, it only shows one page in the thread, no matter how many pages there actually are, but if you refresh the page, it shows the correct number.

I was thinking about writing it myself if I have time one day, but figured I might as well mention it here.

Other things I'd be curious about:

First, I'd assume since this group is labeled as for userscripts, other scripts that do things like screenscraping information off the site shouldn't be posted here, but I thought I might as well doublecheck. I do have a few ruby scripts hanging around my computer involving fimfiction... (Even if I never figured out how to get it to log in as me from mechanize.)

Also, does anyone have any idea how many pages I can request in a short time without abusing the site, and how much difference requesting the whole page verses the header would make?

--arcum42

yrfoxtaur
Group Contributor

2329218
don't try to get your script to log in, because that requires that your ruby script be running a full browser inside itself. rather, feed it the contents of your fimfiction session cookie. when it has that, it can do anything you can.

ssokolow
Group Contributor

Another idea I don't have time to implement right now: Something which uses something like localStorage to insert a "Mark as Read" button into group forum lists and highlights threads newer than the timestamp the button updates.

(Since knighty doesn't seem to have implemented any "subscribe to updates on this existing thread" mechanism and it's a pain to manually keep track of which threads have been updated since I last checked.)

arcum42
Group Admin

2332513

Thanks. I've had it creating a cookie, so it could turn mature on and off, but I didn't think about copying an existing cookie.

Essentially what I've got at the moment is one ruby file with a series of functions for scraping various things, then one that calls the first one and does whatever I feel like at the moment. I've been meaning to make it usable by people other then me, but haven't gotten to it. :twilightsheepish:

Essentially, it can create files detailing the names and urls of the fanfics in every folder in a group, check to see if a fanfic actually exists, download it in various formats, and check to see when someone was last on. And there's a partially working function to tell you who's online in a group...

I can obviously tell it to do things like check all the fanfics in a group and see if they are up, download them, and so on, but that's where I get nervous about putting strain on the servers.

I've wanted to be able to pull lists of my favorites and read later fanfics for a while, though...

Of course, I've been meaning to get it to archive group threads and pull info from them, too, I just haven't gotten to that either...

--arcum42

Hi, new here. I'm not sure if this has been requested yet but I would like to disable the new progress bar that has been added in each chapter. You scroll down and it scrolls with you, it is insanely distracting for me and I want it gone.

JBL

2333938 I see I'm not the only one here about that. I actually don't mind the rest of changes made to the site, but that red blob moving across the screen as I progress on a chapter is irritating. I'm forced to read from the lower middle to the bottom of the screen, which doesn't leave a very pleasant reading experience.

I know right! I really hope someone can remove it for us and give us a script! 2334323

Also is there a way to replace icons from the site to what you want?

JBL

2335874 Have you tried it and does it work?

I am new to all of this. I still need to install the plugin for chrome to allow these to work. 2335911

JBL

2335920 Heh, me too. :twilightsheepish:

ssokolow
Group Contributor

2335850

That can be done via userstyles too but it'd take more time than I can spare... plus I don't know which icons you'd want to replace them with.

ssokolow
Group Contributor

2335920

Go to the Userstyles.org page for the thing I wrote. If you don't have Stylish installed, it'll replace the "Install" button with a link to the version appropriate for your browser.

I just don't like how all of them no longer have color. I kind of want the site to look like how it did before this dumb skin update. Might be a lot to ask I know. 2335937

It did not work. I clicked on new script and copied the code and hit save. Reloaded chrome, the bar is still there.

JBL

2335949 For my part it works perfectly (I use Firefox). Thank you very much! :pinkiehappy::rainbowwild:

ssokolow
Group Contributor

2335994

That's because it's a userstyle not a userscript and, even for userscripts, the "copy the code" way is an ugly hack.

Stuff on userstyles.org is, by definition, hosted properly so, if you have to copy and paste anything, something is wrong.

When you go to the page for it, what does the big, colored button say?

It'll almost certainly be one of the following two cases:
1. It's green and says "Install with Stylish". If so, click it.
2. It's blue and says "To use this style, first install Stylish..."

In case #2, you can either install Stylish to get the green button or click the "install this style as user script" link which shouldn't require copy-pasting if you have TamperMonkey and it's set up properly.

I highly recommend installing Stylish. It lets you do things like turning userstyles on and off without reloading the page.

It works! Heh, sorry for not reading the page first. Thank you again!

ssokolow
Group Contributor

2335955

It would be a bit much to ask. I'd have to go dig up a saved copy of one of the pages so I could extract all the icons and then write a script with individual rules to change them all back. That's rather monotonous work.

Then I wish Knighty would give us the option for customs skins instead of just forcing one on us :ajsleepy: 2336106

ssokolow
Group Contributor

2336143

Part of the problem is that having both colorful icons and high-DPI icons is a complicated problem to solve.

The old, colorful icons were 16x16px PNG images. Because they were grids of dots, they got blurry on higher-DPI monitors but could have color.

These new icons are glyphs in a font like the letter A in this text I'm typing. Because they're stored as lines and curves, they can be scaled to any size and still look sharp and crisp... but there's no standard for multi-colored fonts yet.

SVG would do both (It does color and remains crisp and sharp at any size) but too many people (about 16.5%) are still on browsers like IE 8.0 and Android 2.3 which don't do SVG.

Switching between font-based icons and other types is too complicated for Knighty to do because he'd also have to guarantee that it works reliably.

That sucks butt. My monitor is a 1680 x 1050 VGA. It loaded the color icons much better than these. 2336177

ssokolow
Group Contributor

2336214

1680x1050 says nothing about the DPI. (DPI = Dots Per Inch)

If it's around 22" diagonally, then it's just like my brother's screen and isn't high DPI.

It is 22 inches, I tried looking it up but the specs were not very detailed. It is a Flatron W2234S 2336381

ssokolow
Group Contributor

2336572

So, yeah. It's about the same DPI as my 19" 1280x1024 LCDs and much lower DPI than the 800x480 screen on my little pocket device.

The higher the DPI, the more pixels in the same physical space, which means the smaller each individual one is. A monitor like yours or mine will generally be in the 72-96 DPI range. My little pocket device is around 120 DPI if I remember correctly.

The "Retina Displays" on recent iPhones, iPads, and MacBook Pro laptops range from 220 DPI to 326 DPI. That's what they mean by "High DPI". A 15" MacBook Pro's screen resolution is 2880x1800 and that's the lowest-DPI one (the 220 DPI one).

Well I know the DPI on my Galaxy S3 is certainly higher lol.

With the new user pages here, I bet there will be a good amount of new threads here the coming week =P

For now, I have (what I hope is) a simple request.
Could someone make a userscript/style that switches the left and right column in user pages? I'd like the 300px column to be to the right.

yrfoxtaur
Group Contributor

ack. I cannot style on my tablet, and the bells are driving me nuts. (blog post)

someone fix it!
maybe you could, 2336106?

ssokolow
Group Contributor

2444695

Which tablet OS?

Also, preemptively, if I can find a solution to get stylin' on it, here's what you'll want to apply:

@namespace url(http://www.w3.org/1999/xhtml);

@-moz-document domain("fimfiction.net") {
.christmas-decoration { display: none !important; }
}

yrfoxtaur
Group Contributor

2445737 oh, it's android, firefox, with stylish installed.
when I said "I can't style" I meant that creating a style while limited to my tablet is a PITA, because of a lack of tools like firebug and web inspector and the lack of a full sized keyboard.

also, stylish on mobile has no ability to manually add styles, gotta feed it a url or get it off userstyles.org

ssokolow
Group Contributor

2446186

Hmm. That is a pickle. I don't have any mobile devices to install it on for testing and I'm not sure I want to add something so transient to my Userstyles.org page.

Would the raw URL (the <> button) on this do the trick?

https://gist.github.com/ssokolow/25e353574159ae4b3373

yrfoxtaur
Group Contributor

2448245 it ought to, but for whatever reason, it doesn't.
think I'll just tough it out. Don't want to put it up on my userstyles page either

2326589
Would it be possible to take the "Import From Gdocs" button and add it to the new blog post page?

  • Viewing 1 - 50 of 121