More Awesome Than You!
Welcome, Guest. Please login or register.
2024 November 22, 06:47:29

Login with username, password and session length
Search:     Advanced search
540287 Posts in 18067 Topics by 6545 Members
Latest Member: cincinancy
* Home Help Search Login Register
+  More Awesome Than You!
|-+  TS3/TSM: The Pudding
| |-+  Pudding Factory
| | |-+  Sims 3 Exchange Greasemonkey Script
0 Members and 1 Chinese Bot are viewing this topic. « previous next »
Pages: [1] 2 THANKS THIS IS GREAT Print
Author Topic: Sims 3 Exchange Greasemonkey Script  (Read 80965 times)
Agret
Asinine Airhead

Posts: 9


View Profile
Sims 3 Exchange Greasemonkey Script
« on: 2009 June 11, 12:21:22 »
THANKS THIS IS GREAT

Here is a greasemonkey script I have created to make it so you can directly download content from the Sims 3 Exchange without having to login.

Code:
// ==UserScript==
// @name          Sims 3 Exchange Link Fixer
// @namespace     mailto:aliaszero2097@gmail.com
// @include       http://www.thesims3.com/*
// @include       https://www.thesims3.com/*
// @description   Repace Sims 3 Exchange Links
// ==/UserScript==

(function() {
  // Override the downloadAsset and loginAndDownload functions
  // which normally pop up a login box
  unsafeWindow.downloadAsset = function(assetId) {
      document.location='sims3://download/?assetId=' + assetId;
  }
  unsafeWindow.loginAndDownload = function(theAction,theAssetId) {
      document.location='sims3://download/?assetId=' + theAssetId;
  }

  // Override the "save file" link so that it is a direct link
  // to the Sims3Pack file :)
  function downloadFeaturedAssetsForMembers(assetId,downloadurl)
  {
    document.getElementById('saveToFileLinkId').href = downloadurl;
  }
  function updateDownloadCountOpenNewWindow(assetID,downloadurl)
  {
    document.getElementById('saveToFileLinkId').href = downloadurl;
  }
  var newline = '';
  var bodyTag = parent.wrappedJSObject.document.getElementsByTagName('body')[0];
  var allLines = bodyTag.innerHTML.split('\n');
  for (var i = 0; i < allLines.length; i++) {
    if (allLines[i].indexOf('updateDownloadCountOpenNewWindow') > -1) {
eval(allLines[i]);
}
if (allLines[i].indexOf('downloadFeaturedAssetsForMembers') > -1) {
eval(allLines[i].substring(3));
}
  }
})();

To install this you must be using Firefox, and have the Greasemonkey extension installed.

Copy the contents of the code box into notepad and save it as "sims3.user.js"
(be sure to change from "text document" to "all files" in the save as box)

Drag the text file into your firefox window and it will bringup the install prompt,
after installing you can delete the text file from wherever you saved it as a copy
is made into your Firefox user profile automatically.

Enjoy using the Sims 3 Exchange without having to manually run the launcher for each file Cheesy
« Last Edit: 2010 October 27, 09:37:43 by Agret » Logged
simluvr
Asinine Airhead

Posts: 6


View Profile
Re: Sims 3 Exchange Greasemonkey Script
« Reply #1 on: 2009 June 12, 00:19:26 »
THANKS THIS IS GREAT

I would, but in previous Sims, I found the exchange stuff usually ended up corrupting my game. All I see there are recolors anyway, basically. Thanks anyway.

Does it work for MTS?
Logged
Erry
Corpulent Cretin
*
Posts: 110



View Profile
Re: Sims 3 Exchange Greasemonkey Script
« Reply #2 on: 2009 June 12, 06:26:50 »
THANKS THIS IS GREAT

I just tested it and it isn't working... I tried it on a separate sim page and on an exchange page.
Logged

"I go to his page and I see 'Hot Lesbians' as a tab... keep your sex life to yourself, bitch."
matzok
Tasty Tourist

Posts: 3


View Profile
Re: Sims 3 Exchange Greasemonkey Script
« Reply #3 on: 2009 June 12, 07:34:24 »
THANKS THIS IS GREAT

That don't work. Just opens the login page.
Logged
Agret
Asinine Airhead

Posts: 9


View Profile
Re: Sims 3 Exchange Greasemonkey Script
« Reply #4 on: 2009 June 13, 11:27:05 »
THANKS THIS IS GREAT

Sorry I posted that in a hurry before school, if you check the script I accidentally put an extra } in, i'll update my post. Try the new one.
Logged
Zazu
Asinine Airhead

Posts: 20


View Profile
Re: Sims 3 Exchange Greasemonkey Script
« Reply #5 on: 2009 June 13, 12:54:01 »
THANKS THIS IS GREAT

You don't need that script to download from the exchange without logging in or using the launcher.  It's actually very simple.  If you click on the picture of the item you want to download, another page loads that has a direct link to the Sims3Pack file and you right lick on it and can just save it to your desktop. 
Logged
Agret
Asinine Airhead

Posts: 9


View Profile
Re: Sims 3 Exchange Greasemonkey Script
« Reply #6 on: 2009 June 13, 13:17:42 »
THANKS THIS IS GREAT

Just checked the exchange, they have changed the way the links work now and I have updated the script to work with the new system Smiley

I have also tested it on the site this time to make sure I didn't miss any brackets Tongue

Update:
Thanks to Zazu for pointing out about the direct link,
Wasn't too hard to find in the HTML source and I have updated the script to replace the "Save File" link so that it goes to the Sims3Pack now Smiley
(Whee, script has scroll bars, starting to get long Wink)

In response to simluvr saying that all they see are recolors, that's true but you can also get some pretty cool Lots off of there Tongue
« Last Edit: 2009 June 13, 13:40:27 by Agret » Logged
simangelgoth
Tasty Tourist

Posts: 3


View Profile
Re: Sims 3 Exchange Greasemonkey Script
« Reply #7 on: 2009 June 19, 01:22:55 »
THANKS THIS IS GREAT

I am sure I am being a Dim Wit but I have tried every which way to Drag this into my Firefox window..
I am doing something wrong. It does not install or do anything.
Would love to install it.
Logged
feralamour
Tasty Tourist

Posts: 1


View Profile
Re: Sims 3 Exchange Greasemonkey Script
« Reply #8 on: 2009 June 20, 06:35:48 »
THANKS THIS IS GREAT

I am sure I am being a Dim Wit but I have tried every which way to Drag this into my Firefox window..
I am doing something wrong. It does not install or do anything.
Would love to install it.
I am sure I am being a Dim Wit but I have tried every which way to Drag this into my Firefox window..
I am doing something wrong. It does not install or do anything.
Would love to install it.

You need the Greasemonkey firefox add-on in order to install this. Install that then drag the file you made into the window after restarting firefox.
Logged
Agret
Asinine Airhead

Posts: 9


View Profile
Re: Sims 3 Exchange Greasemonkey Script
« Reply #9 on: 2009 June 20, 16:57:54 »
THANKS THIS IS GREAT

Edited my post to make it a bit more obvious  Grin
Logged
essiecab
Tasty Tourist

Posts: 1



View Profile
Re: Sims 3 Exchange Greasemonkey Script
« Reply #10 on: 2009 June 21, 02:45:49 »
THANKS THIS IS GREAT

Okay, I think I'm dimwit also because I can't figure out how to work it. When I go to the Exchange and click to download something, it tells me to "Choose an application." I tried choosing Firefox, but it just opens up a blank page and as far as I can tell nothing happens.
Logged
Agret
Asinine Airhead

Posts: 9


View Profile
Re: Sims 3 Exchange Greasemonkey Script
« Reply #11 on: 2009 June 21, 03:02:00 »
THANKS THIS IS GREAT

If you are clicking on:

Then you must open with Sims3Launcher from your Sims 3 folder.

If you are clicking on:


Then you are downloading the Sims3Pack file directly and can open it with the Sims3Launcher,
or with another Sims 3 content manager that supports opening Sims3Pack files.

You can save all the packs you want into a folder and then batch add them with 3Viewer or similar package manager.
Logged
Flash
Tasty Tourist

Posts: 2


View Profile
Re: Sims 3 Exchange Greasemonkey Script
« Reply #12 on: 2009 July 04, 04:14:06 »
THANKS THIS IS GREAT

Hi there, I have installed the script, however I think they changed it again and it will not work.
It will open Sims 3 Launcher but the item in the list is just empty, No name, no Type, Size 1kb. The install option is grayed out. Is it possible to have an update please?
Logged
Agret
Asinine Airhead

Posts: 9


View Profile
Re: Sims 3 Exchange Greasemonkey Script
« Reply #13 on: 2009 July 04, 05:53:19 »
THANKS THIS IS GREAT

Just tested it on this page and this page, the "Add to Game" link worked fine on both. The "Save File" link is also working.

If you are unable to use the "Add to Game" button try using save file and installing it with a batch content adder or by individually opening each Sim3Pack file
Logged
Flash
Tasty Tourist

Posts: 2


View Profile
Re: Sims 3 Exchange Greasemonkey Script
« Reply #14 on: 2009 July 04, 15:02:05 »
THANKS THIS IS GREAT

Hey.
Not sure why Add to Game is not working for me. Bassically it allows me to choose launch application, I launch it with Sims 3 Launcher, but in the launcher as I said, the item appears void (no name, no description, no picture, 1kb).
Now the save file works great. I save it in downloads and then with Sims 3 launcher I can install it (it has description, picture, good size, etc). So thank you very much, not sure why I didn't tried it before.
Also, what exactly do you mean by batch content adder?
In the end cheers. You made an awesome program!
Logged
newguy
Tasty Tourist

Posts: 1


View Profile
Re: Sims 3 Exchange Greasemonkey Script
« Reply #15 on: 2009 July 04, 16:11:44 »
THANKS THIS IS GREAT

I registered to say, thank you for this amazing script!
Logged
unknownlUser
Asinine Airhead

Posts: 38



View Profile
Re: Sims 3 Exchange Greasemonkey Script
« Reply #16 on: 2009 July 04, 16:12:39 »
THANKS THIS IS GREAT

I can confirm this works for me. I haven't been able to use the direct links or pasting the ID# in address bar method(s) as some had suggested, but this one works like a charm.

You have to restart Firefox twice:
- 1st for the add-on to be recognized and
- 2nd for the script [after loading the script, if you can see "Sims 3 Exchange Link Fixer" and the 2 links on the Included Pages, then a restart might not be needed.]

Steps I took:
- copy the code and save as directed
- download and install add-on; restart browser
- ensure that Greasemonkey add-on itself is enabled [Tools menu -> Greasemonkey] or next step won't work
- drag the .js file into a tab and click "Install script" when prompted, restart browser again
- go to Tools menu -> Add-ons -> Extension icon -> options button: ensure the script is listed in the "Manage user script window" and the 2 links on the Included Pages are listed
- click on the picture of the item on the EA TS3 Exchange site you wanted, until you can see the "Add to Game" and "Save File" links
- click or right-click either link to download the sim3pack file
- install as preferred via Launcher or the 3Viewer tool from jfade
- done

hth....  Cool
Logged
Rizin
Tasty Tourist

Posts: 4


View Profile
Re: Sims 3 Exchange Greasemonkey Script
« Reply #17 on: 2009 July 04, 16:47:04 »
THANKS THIS IS GREAT

Im really glad I found this post

worked perfectly!

It took me a minute to realize what you meant by "Drag the text file into your firefox window"

but I eventually got it

thanks
Logged
Agret
Asinine Airhead

Posts: 9


View Profile
Re: Sims 3 Exchange Greasemonkey Script
« Reply #18 on: 2009 July 06, 07:31:00 »
THANKS THIS IS GREAT

I registered to say, thank you for this amazing script!
No problem Smiley
Logged
Shazaam
Blathering Buffoon
*
Posts: 60


View Profile
Re: Sims 3 Exchange Greasemonkey Script
« Reply #19 on: 2010 October 13, 05:39:02 »
THANKS THIS IS GREAT

Any update?
Logged
J. M. Pescado
Fat Obstreperous Jerk
El Presidente
*****
Posts: 26288



View Profile
Re: Sims 3 Exchange Greasemonkey Script
« Reply #20 on: 2010 October 13, 06:30:38 »
THANKS THIS IS GREAT

The user who made this is dead, so no. Does it no longer work?
Logged

Grant me the serenity to accept the things I cannot change, the courage to change the things I cannot accept, and the wisdom to hide the bodies of those I had to kill because they pissed me off.
dragonic
Blathering Buffoon
*
Posts: 73


Lurker extraordinaire


View Profile
Re: Sims 3 Exchange Greasemonkey Script
« Reply #21 on: 2010 October 16, 03:11:57 »
THANKS THIS IS GREAT

This script basically automates the following:

- Go to the desired exchange item page
- View source
- Search for .Sims3Pack
- Copy the *.Sims3Pack link and download it

I didn't need a script for that. I've been doing it for eons.
Logged
Menchii
Asinine Airhead

Posts: 37


Standing Kitteh!!


View Profile
Re: Sims 3 Exchange Greasemonkey Script
« Reply #22 on: 2010 October 17, 15:37:22 »
THANKS THIS IS GREAT

I tested this script and it half works for me.  The Add to Game button works and bypasses the login box but the Save File link brings up the login box.  Can anyone else confirm or deny?  I can go back to doing the View Source way but Lazy Cat is Lazy.  I tried multiple kinds of downloads too. Sims, lots, recolors, etc.
Logged

And, you know, rude, mean people want a place to call home, too. There are plenty of sugary nice places already. This ain't one of them.
Agret
Asinine Airhead

Posts: 9


View Profile
Re: Sims 3 Exchange Greasemonkey Script
« Reply #23 on: 2010 October 27, 09:36:51 »
THANKS THIS IS GREAT

Script updated, was an easy fix.
For some reason they kept the old code in but commented it out,
I never understood how most commercial web developers think.  Roll Eyes

I'll see if I can update it to hook the new method on the site in case they remove the comment later.
Logged
Freezerburn
Dimwitted Dunce
*
Posts: 176


I haet F-ly retarded snowflaek


View Profile
Re: Sims 3 Exchange Greasemonkey Script
« Reply #24 on: 2010 November 09, 09:34:12 »
THANKS THIS IS GREAT

This script basically automates the following:

- Go to the desired exchange item page
- View source
- Search for .Sims3Pack
- Copy the *.Sims3Pack link and download it

I didn't need a script for that. I've been doing it for eons.

Woot! I never think of this!
Logged


ISTJ                       
Imma Ee Ass Elle
Don't Abuse The Search Box!
Pages: [1] 2 Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.121 seconds with 20 queries.