Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

scootaru

macrumors 6502
Original poster
Nov 7, 2008
306
0
Columbus, OH
Javascript slows Safari down so much, so I usually have it disabled. Ocassionally it is needed and I have to go through the process of Closing Safari->Opening Settings->Opening Safari Settings->Turning JavaScript On->Closing Settings->Launching Safari->Reloading Page. This is so annoying!

Does anybody know of an add-on to add Javascript to SBSettings or another solution to enable Javascript without closing Safari?
 
Well, since I didn't get a response, I took matters into my own hands. I used BigBoss's tuturial: http://thebigboss.org/guides/sbsettings-toggle-spec/and modified the source file he provided in the guide. It's not too hard to do yourself, but it would be nice if someone made a package.

If you want to give it a shot, here's what you do:

1. Download the source and makefile at bottom of this post.(Originally from BigBoss guide on SBSettings Toggles)

2. Connect to your iPhone via SSH (http://thebigboss.org/guides/install-and-use-ssh/) and create "JavaScript" folder in the /var/mobile/Library/SBSettings/Toggles directory (Tip: Don't forget to turn SSH on, I spent an hour trying to connect with it turned off, D'oh)

3. Move extracted files to the newly created folder

4. Edit the main.m source file and replace all references of "com.apple.locationd.plist" to "com.apple.mobilesafari.plist" (4 instances)

5. Still in main.m, replace all references of "com.apple.locationd/Prefs" to "com.apple.mobilesafari/Prefs" (1 instance)

6. Still in main.m, replace all references of "LocationEnabled" to "WebKitJavaScriptEnabled" (3 instances)

7. Save main.m

The biggest problem for me was figuring out how to compile mainly due to this being my first experience programming the iPhone. For those reasons, I'll go into a little more detail on the compiling process. BTW, these instructions are for compiling on the iPhone using version 2.x only. I don't own a mac and this is the only way I know how to compile.

8. In Cydia, make sure the following packages are installed: APT, iPhone 2.0 Toolchain, Make, & MobileTerminal

9. In MobileTerminal, type "su" and password is "alpine"

10. Navigate to the JavaScript folder by using "cd /var/mobile/Library/SBSettings/Toggles/JavaScript"

11. Next compile with the command: "make" (This takes a moment, so be patient)

12. Toggles must be pseudo signed with ldid utility, so type "apt-get install ldid", let it run and then "ldid -S Toggle.dylib" (l -> lowercase L)

That's it! Now go into SBSettings settings and set JavaScript toggle on.

Now for the bugs that need worked out. There isn't an icon and you can't simply refresh Safari after enabling JavaScript to get it to work. You have to close Safari and re-open it. Help on this information would be greatly appreciated.

Edit: Here are the original files I am referring to. These files are also located on the BigBoss guide.
 

Attachments

  • Toggle Example Source and Make Files.zip
    1.4 KB · Views: 230
Mms

ok, ive done all this but i have attempted to make a toggle to turn MMS on and off.
This will help enable group sms and not group mms when mms is enabled in the messages settings
basiaclly i swapped all the relevent things with com.apple.MobileSMS.plist and MMSEnabled and com.apple.MobileSMS/Prefs

i compiled it using terminal etc

and it shows in sbsettings and works... when i hit it in sbsettings is off in the preferences. however its not actually "off"
meaning it still sends group txt's as an MMS
however if i phiscally go to the preferences and toggle the MMS switch to off (thats the default apple preferences) it does turn it off and enables me to send group txt's as a text message.

I want to do this because several of my mates can't receive mms and it is easier to use SBSettings than Home-Settings-Messages-MMS Off-Home-Message etc

Hope all of this makes sense, its a bit of a ramble i guess!!
HAHA

Thanks in advance
 
ok i have discovered that after a respring the toggle works.
ie hit toggle - respring (mms off)
hit toggle - rspring (mms on)
 
Gr8 work mate..

i have a toggle request you might find interesting..

How about one to turn on and off "push" (not push notifications) but the toggle in mail settings to have either push (for mobile me) or fetch...

push slows down the phone and uses battery so when i get to 20% i turn off 3g and push to save battery life. there is already a 3g switch and a push one would be cool :apple:
 
ok, ive done all this but i have attempted to make a toggle to turn MMS on and off.
This will help enable group sms and not group mms when mms is enabled in the messages settings
basiaclly i swapped all the relevent things with com.apple.MobileSMS.plist and MMSEnabled and com.apple.MobileSMS/Prefs

i compiled it using terminal etc

and it shows in sbsettings and works... when i hit it in sbsettings is off in the preferences. however its not actually "off"
meaning it still sends group txt's as an MMS
however if i phiscally go to the preferences and toggle the MMS switch to off (thats the default apple preferences) it does turn it off and enables me to send group txt's as a text message.

I want to do this because several of my mates can't receive mms and it is easier to use SBSettings than Home-Settings-Messages-MMS Off-Home-Message etc

Hope all of this makes sense, its a bit of a ramble i guess!!
HAHA

Thanks in advance

I don't have MMS yet :(, so I can't try to debug your issue, but I have a question. When you are trying to send group texts, what is the process you go through when doing so? For instance, do you 1) open Messages app 2) open SBSettings 3) Toggle off MMS 4) close SBSettings 5) create Text and send.

The reason I'm wondering is because the Messages app probably checks the state of the MMS setting when first launched, so disabling MMS after the Messages app is open is useless. You would have to turn the setting off before launching Messages app.

Also, Xander, how did you compile? I'm assuming you are using 3.0, right?
 
Since we are talking about "wished for" toggles-how about one for Ultrasn0w. Most times don't need it, would like to turn it off because every time I reboot, the phone says "no sim inserted" for a few seconds, so it seems like it is taking longer to boot.
 
Gr8 work mate..

i have a toggle request you might find interesting..

How about one to turn on and off "push" (not push notifications) but the toggle in mail settings to have either push (for mobile me) or fetch...

push slows down the phone and uses battery so when i get to 20% i turn off 3g and push to save battery life. there is already a 3g switch and a push one would be cool :apple:

Same instructions as above except plist file is "com.apple.persistentconnection-mcc.plist"

notify_post command should call "com.apple.persistentconnection-mcc/Prefs"

enable key is "PCEnablePush"

EDIT: I did this and can confirm it does work.
 
Same instructions as above except plist file is "com.apple.persistentconnection-mcc.plist"

notify_post command should call "com.apple.persistentconnection-mcc/Prefs"

enable key is "PCEnablePush"

I'd like to try it, but I can't figure out how to compile on the iPhone in 3.0.

I had to manually install libgcc as it ain't in cydia then gnu c compiler and 2.0 toolchain can be installed
once ou have those you can use terminal to compile it. Just follow the instructions above. That's what I did for the mms one. But it does not work without a respring.
Can that be fixed? The toggle appears to turn of mms by it is still active
 
I don't have MMS yet :(, so I can't try to debug your issue, but I have a question. When you are trying to send group texts, what is the process you go through when doing so? For instance, do you 1) open Messages app 2) open SBSettings 3) Toggle off MMS 4) close SBSettings 5) create Text and send.

The reason I'm wondering is because the Messages app probably checks the state of the MMS setting when first launched, so disabling MMS after the Messages app is open is useless. You would have to turn the setting off before launching Messages app.

Also, Xander, how did you compile? I'm assuming you are using 3.0, right?

my process is as follows
Home Screen
SBSettings
Toggle to off
Close
open messages app
type two recipiants
the header says group mms

however doing the same process
toggle off
respring
open messages
type two...
The header says new message NOT group mms

my theory is right and the toggle 'toggles' the switch in the settings but I think I am missing somehing in the code
and yes I am on 3.0
 
ok, ive done all this but i have attempted to make a toggle to turn MMS on and off.
This will help enable group sms and not group mms when mms is enabled in the messages settings
basiaclly i swapped all the relevent things with com.apple.MobileSMS.plist and MMSEnabled and com.apple.MobileSMS/Prefs

i compiled it using terminal etc

and it shows in sbsettings and works... when i hit it in sbsettings is off in the preferences. however its not actually "off"
meaning it still sends group txt's as an MMS
however if i phiscally go to the preferences and toggle the MMS switch to off (thats the default apple preferences) it does turn it off and enables me to send group txt's as a text message.

I want to do this because several of my mates can't receive mms and it is easier to use SBSettings than Home-Settings-Messages-MMS Off-Home-Message etc

Hope all of this makes sense, its a bit of a ramble i guess!!
HAHA

Thanks in advance


I was playing with the carrier.plist file found in /var/mobile/Library/Carrier Bundles/ATT_US.bundle/ and I noticed there was the key GroupModeEnabled under the MMS dictionary. I changed the true statement to false and rebooted the phone. I then opened the Messages app and added multiple names to a text and it never displayed group MMS at the top. The camera was still next to the text body indicating MMS was enabled. If I attempted to add a pic with multiple recipients, it simply said "New MMS" at the top.

Next, I went back to the carrier.plist file and changed the GroupModeEnabled key back to true and rebooted the phone. After launching the Messages app, I added multiple recipients and "New Message" remained at the top. I added a pic, and the message changed to "New Group MMS".

If you don't mind messing with these files, go ahead and try it at your own risk. I can't actually send MMS, so I'm only assuming they work. You may want to back up the Carrier.plist file before trying anything.

I'm now starting to wonder why group texts are being sent as an MMS when no pics or videos are even selected. Sounds like a bug to me.

Also, I tried creating a toggle for GroupModeEnabled using the com.apple.operator.plist file in Preferences. It didn't work. It changed the key to false in that file only, not the original carrier.plist file. I don't know that much about symbolic links.
 
I'm now starting to wonder why group texts are being sent as an MMS when no pics or videos are even selected. Sounds like a bug to me.

this is exactly the reason why i looked into this toggle.
but i still cant get it to work....
........can anyone help?!
 
Since we are talking about "wished for" toggles-how about one for Ultrasn0w. Most times don't need it, would like to turn it off because every time I reboot, the phone says "no sim inserted" for a few seconds, so it seems like it is taking longer to boot.

Looks like somebody made an add-on for SBSettings. It's in Cydia.
 
Could you share with us your push toggle?
I cannot compile it since apparently I cannot get libgcc to install in 3.0.
 
are there any toggles that are not in cydia meaning you need to add repos in order to get
If so what are they?
 
There will appear one on BigBoss repo. it's called PushMail :)

Are u the author of the add-on? If so, how hard is it to make the package so it can be added to a cydia repo? Obviously, I know how to create a toggle on my own phone, but I don't know how to make the .deb file or whatever it is that's required to put on a repo. Kinda off topic, I know, sorry.
 
I didn't do any deb package. Just made an archive with the on/off icons in a folder and the Toogle.dylib in another. It's really easy.

This is the Guide for submiting an app to BigBoss repository. It doesn't say anything about a package so I didn't do any. :p

And I also had a little chat about the toggle with BigBoss and he didn't say anything about doing a package. Just about how I did it and if I want icons for my toggle( I forgot to put them in the first place :p).

Hope this helps you. :)
 
There will appear one on BigBoss repo. it's called PushMail :)

thanks for doing this man was my request :p hehe

on tenius matte theme the icon doesnt show up though ... the small icon does when you are choosing your toggles but when its set it doesnt show, do you want a screen shot?
 
What about a toggle for

- Push notifications (not push mail, contacts,calendars)
- Tethering :)


Anyone know how to do this?
I downloaded the SDK so I could build the toggle myself
 
i've been testing to pushmail toggle and doesn't seem to work with Exchange accounts.

When I disable push thru the toggle, I still receive push email!!

I checked and the push option was disabled (30 min fetch).
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.