Chaos in a Can

Subscribe to RSS feed

Skin Tweak 1.2

,

Opera Skin Tweak is a small Python tool I created that unpacks Opera's standard skin, makes some modifications, and packages it back up. This update comes with a new set of tweaks for Opera 11.50's new Featherweight skin.

Download it

Opera Skin Tweak requires Python 2.x with Tkinter. Tkinter is included with the Windows Python package (don't uncheck "Tk/Tcl" while installing) and probably the others as well, though if you installed Python via a package manager, it may not be included.

To run the program, just extract the zip file somewhere and run main.py. Click the Open button to pick the skin to load and the Save button to pick where to save the tweaked skin. Click the tweaks you want to apply from the list, then click the Run button. You can also set the name of the new skin. "{ORIGINAL_NAME}" will be replaced by the skin's original name.

Here are the tweaks for 11.50:
  1. Add "RSS Large" image (22x22) - Adds a larger RSS feed icon for use in custom buttons. The regular icon is smaller than normal toolbar buttons.
  2. Fix pinned tab height - Pinned tabs are normally 2 px shorter than unpinned ones. This makes them the same height as unpinned tabs.
  3. Fix typos in skin.ini - There are a couple places where "StrechBorder" was written instead of "StretchBorder". I don't know if this really causes a problem, but this fixes it anyways.
  4. Hide close button on inactive tabs - Only the active tab will show a close button.
  5. Increase spacing between icon and text on infobar buttons - On the Ctrl+F toolbar and some others, there is very little spacing between icons and text on buttons, making the icons look off-center. This fixes that.
  6. Increase menu button right margin - When the window is maximized, there is very little space between the menu button and the first tab. This adds some extra space there.
  7. Make panel treeview margins symmetric - On the blue highlight marking the selected item in some panels, there is 1px more padding to the left than to the right. Yay OCD.
  8. Make toolbars thinner - thins out the address bar by a couple of pixels and reduces the height of the panel toolbars to match.
  9. Remove spacing between tabs and top edge - this makes opera:config#UserPrefs|ChromeIntegrationDragAreaMaximized control the exact number of pixels between the top of the window and the top of a tab. If you set it to 0, tabs will touch the top edge of the window.

See here for version 1.1.

Update July 31, 2011: The "Hide close button on inactive tabs" tweak used to make the restore/minimize buttons on restored tabs disappear. Now it doesn't.

Update Nov 4, 2011: Here are some tweaks for the new 11.60 snapshot: tweaks-11.60.zip.

All buttons are not equal (in size)

Big button
Small button

Try dragging these to a toolbar. Both of them use the same icon. The only difference is that the first one calls "Go to page" and the second one doesn't.

I am alive!


This happened when I was trying to post something on the forum. My guess is as good as yours...

Song Notifier

Song Notifier is an extension that shows a notification whenever a new song starts playing on an Internet radio service. It currently works with Grooveshark, Pandora and Rdio but it can work with any service that provides a way to be notified when a new song plays. If there is another player you would like it to work with, ask and I'll see if I can make it work.

My attempt to get this working with Pandora was a failure. I figured out how to get notified when a new song starts playing, but the only info Pandora gave me was an ID number, and I don't know what to do with that to get usable info about the song. Please post here if you have any ideas on getting this to work. The new HTML5 Pandora makes it possible to get song info. Song Notifier now works with Pandora. smile

You can configure which corner the notification appears in, what info appears in the notification, what color the notification is, and for how long it appears. Clicking the notification makes it go away.

Post in the comments if you have any questions.

Song Notifier at the Extensions Repository

, , , ...

My computer is currently out of commission. sad Don't expect any updates on anything for a while.

Edit
Diagnosis: fan is dying. Need a new one. Yay sentence fragments.

Edit x2
Computer is working again, though I can't say the same for the fan (or the network card, but that was my own fault). Dell only sold the Studio 14z for a short while, so finding a replacement fan is proving difficult.

Edit x3
I have found a replacement fan, though I won't get it until after finals. That's fine, because I'm not planning on updating anything until finals are over anyways.

Opera Link Library preview

Get it from github

aykev has modified it for Chrome compatibility here

Note: This library is not yet finished! It does not yet implement the import methods, and the majority of its functions have not been tested yet. I have currently only tested bookmark/folder retrieval, creation, and trashing. If you find things that don't work, please tell me.

This is a JavaScript library for accessing Opera Link. It is designed for use with Opera extensions, but it should be usable in any situation where cross-domain XML HTTP requests are allowed (Unite, widgets, nodeJS, other browsers' extensions, etc...). The main library is in operalink.js which depends on oauth.js and sha1.js. Everything else is part of an extension used to test the library.

How to use it
First, include operalink.js, oauth.js, and sha1.js. If your extension isn't already requesting access for all domains, add the following to your config.xml.
<access origin="https://auth.opera.com" />
<access origin="https://link.api.opera.com" />

All Opera Link functions can be accessed from the opera.link object. Functions for specific data types are found in the opera.link.<datatype> objects.

Check background.js for an example that uses the library. It first defines two variables: tempToken and authorized. "tempToken" will be used during the authentication process while we are waiting for the user to grant our application access to Opera Link. "authorized' keeps track of whether we have the proper credentials to access Link. If not authorized, clicking the extension's button will start the authentication process. Otherwise, it will run tests on the library functions.

After registering your application with Opera's OAuth endpoint, you will get a consumer key and consumer secret. Call opera.link.consumer() with those two values before using any other Opera Link functions.

Next, if the user has previously granted access to your application and you have saved the access token and secret, you can load those (automatically handled by opera.link.loadToken()) and check whether they are still valid using opera.link.testAuthorization(). If the callback function is called with "true", we are authorized and don't need to do anything else. Otherwise, we need to get an access token.

To get an access token, first call opera.link.requestToken(). This will generate a temporary token and secret (which I store in tempToken in the example) which are used in the next step, and it will open a new tab where the user can grant your application permission to access his/her data. After accepting, the user is given a 6-digit verification code. Call opera.link.getAccessToken() with the temporary token, secret, and the verification code to get a permanent access token. The example uses the getverifier.js include script to automatically get the verifier code. It also uses opera.link.saveToken() to store the access token so it can be loaded the next time the extension is started.

Once we have access to Opera Link, we can start getting data from it and modifying things. Read the Opera Link API documentation. Each of the methods here just sends one type of request defined there.

Use these objects to access each of the data types:
opera.link.bookmarks
opera.link.notes
opera.link.searchengines
opera.link.speeddial
opera.link.urlfilter

There is also a documentation file in the jsdoc folder. It explains all of the available functions.

Edit 5/4: Just found a fork by aykev for Chrome compatibility. Added a link up top. Sentence fragments.
I have finals over the next few days, so any updates will come after those are over.

One Step Closer To World Domination!

...or a nice gift card at least. Tab Vault is now a featured extension! Thank you everyone who has rated Tab Vault or given feedback!

In other news, Tab Vault 2.1 will be submitted as soon as I can get past this:
Edit: It's submitted now.

Here are the major changes from 2.0 to 2.1:
  • Added localization support. See my previous post for details.
  • The option to close the current tab after saving it makes a return
  • Added an option to disable all animation effects
  • Added an option to increase the popup width
  • Made some minor changes to the look of the popup
  • Added a warning about uninstalling the extension to it's description
  • Fixed: Grouping tabs does not trigger popup resize
  • Fixed: Upper/lower limits of numeric controls on options page don't work properly

Calling All Translators!

Tab Vault now supports localization as of version 2.1. Unfortunately, the only other language I know is German, and I'm far from fluent in it. That's where you come in! If you'd like to translate Tab Vault into another language, here's what you need to do:

  1. Download this build of Tab Vault.
  2. Extract it somewhere so you can work on it.
  3. In the locales folder, make a copy of the "en" folder and rename it to the correct abbreviation for your locale. See here for more information and here for the full list of locale tags.
  4. Drag "config.xml" from the root directory of the extension onto Opera to install Tab Vault in developer mode. (Make sure you create the locale directory first or you may have to restart Opera to get it to recognize the new locale)
  5. Translate the files in the locales folder. Make sure the translations work. Make sure my localization code works too, as I've apparently been pretty inconsistent in making everything localizable.
  6. Send me the translated files (not all the files, just the ones you translated).

The files you need to translate are:
  • help.html - The help page. This is a lot to translate, so I don't blame you if you skip this one.
  • locale-help.css - Two more things you need to translate for the help page.
  • locale-misc.js - A few strings string to translate, and a couple settings for getting things to look right. If the text at the top of the popup doesn't fit, you can increase the minimum popup width. If the little triangles under "Tabs" and "Trash" don't line up under the center of the text, you can adjust those left and right too.
  • locale-options.js - Translations for the options page, upgrade page, and the header and footer of the help page.
  • locale-dropdown.js - Translations for the popup. (formerly locale-popup.js)
  • locales/locales.js - This makes your translation show up in the options page. This doesn't go inside your locale folder but one level above it. (I will update this myself, so you don't need to send me this file)

In the JavaScript files, just translate the quoted strings. In the help file, comments mark the start and end of where you should translate. Press ~ (tilde) at the options page to get links to the upgrade page and the help page with the first-time message.

Though I recently made it possible to switch languages without a reload, Opera will not reload some translation files until you reload the extension. You can reload the extension by pressing Ctrl+Shift+E to open the extension manager, then clicking the "Reload" button under Tab Vault.

In locales.js, simply add a new LocaleDef item to the locales array. This makes you language appear in the options page. It should look like this:
new LocaleDef('language code', 'Name of language', 'Localized name of "default" language'),

If you do translate the help file, change "LocalizedHelp" in your locale-misc.js to "true".

All strings in the JavaScript files will be inserted as HTML, so you can use HTML entities and tags if necessary.

If translations are missing, messages will show up in the error console (Ctrl+O) when you visit the page that uses them. Missing strings will appear in red as "loc:StringName" so you can find them within the translation files. Ask in the comments if you have any questions or run into any problems. Thanks!

October 16, 2011: Updated the translation package to 2.4.
Later, October 16, 2011: Fixed a couple bugs and changed how duplicate removal works. The updated package is up now.
December 11, 2011: Updated the package again. This update adds searching with Ctrl+F and one more string, Search, in locale-popup.js. This is the placeholder text for when the search box is unfocused.
January 13, 2011: Updated the translation package to 2.4.1. The list of languages in the options page is now generated by locales/locales.js. Now you just need to update locales.js to get your language to appear in the options page.
April 6, 2012: Updated the translation package to 2.5 alpha. I renamed locale-popup.js to locale-dropdown.js because of problems with some people's content blockers. Missing strings will now show up as the name of the string you should translate. There are a lot of backend changes in this version to prepare for Opera 12.00, so please tell me if you find any bugs.
May 2, 2012: Updated the package again. The help file should be mostly working now.
June 18, 2012: Version 2.5 is ready to be submitted. There is one more string to translate.
June 28, 2012: So it turns out 2.5 wasn't ready to be submitted. It should be now. There is another string to translate.

Changes in 2.5
locale-options.js
  • + FeatherweightIcon (line 44)
  • + MiddleClickOpenCurrent (line 52)
  • changed Language (line 56. The extension no longer needs to be restarted to change languages.)
  • + ConfirmResetSettings (line 81. I don't know how I missed these until now.)
  • + ConfirmResetTabs (line 82)
  • + ConfirmResetAll (line 83)
  • changed HelpLink (line 96)

locale-dropdown.js
  • + CxSaveGroup (line 48. This appears in the "Save Tab" context menu, but only if the current tab is part of a group.)

I think I fixed all the help pages for the various translations, but I might have broken something.

Changes in 2.5 b2
locale-options.js
  • + OpenNextToActive (line 24)


Translation Status:
Dutch (by Nino van den Bosch) - Needs new strings for 2.4, 2.5a, 2.5b
French by David - Needs CxSaveGroup and OpenNextToActive strings
German (by FreebirthOne and philflip and Otto Wasserfeldt) - Needs OpenNextToActive string
Greek (by Andreas Patman) - Needs new strings for 2.4, 2.5a, 2.5b
Georgian (by Beqa Arabuli) - Needs new strings for 2.5a, 2.5b
Italian (by Dark Revenger) - Needs new strings for 2.4, 2.5a, 2.5b
Polish (by Saskatchewan) - Needs OpenNextToActive string
Portuguese (by Ilidio) - Needs new strings for 2.4, 2.5a, 2.5b
Russian (by Dmitry Kochev) - Needs new strings for 2.5a, 2.5b
Serbian (by shobra) - Needs Search string, strings for 2.5a, 2.5b
Spanish (by Juan) - Needs new strings for 2.3, 2.4, 2.5a, 2.5b
Turkish (by metude) - Needs new strings for 2.4, 2.5a, 2.5b


Tab Vault 2... Finally!

It's out! Download it from the extensions catalog or check out the newly updated support page.

Tab Vault 2.0 fixes most of the bugs which have been reported and implements as many of the feature requests as I could implement. It should work everywhere now (and it'll tell you when it can't save the current page), and most importantly, it adds tab groups!

If you like Tab Vault, please give it a review/rating in the extension catalog. If you think something could be done better or you find a bug, post about that too! Thanks!

Tab Vault 2... Eventually

,

I just wanted to let you all know, I haven't forgotten about Tab Vault. Here's what I'm planning for the next version:
  • Everything will be moved to a pop-up. When I started making Tab Vault, Opera was in alpha and pop-ups weren't very reliable, so I didn't use them. They are now much more reliable than getting a message to the root document of the selected tab, so I'm switching back to pop-ups. This should have the added effect of reducing memory usage, since they code that builds the panel won't be loaded in every tab.
  • Settings will be removed from the panel/pop-up. When I started making Tab Vault, there was no Preferences page. Now there is and I see no reason not to use it.
  • Tabs will be groupable. You won't be able to save entire stacks though since the extensions API doesn't have any stacks support yet.

These things might appear in later versions:
  • Synchronize tabs with Opera Link (definitely)
  • Remember which tab groups are expanded (definitely)
  • Right-click context menus for tabs, groups (definitely)
  • Internationalization (definitely)
  • Mode to show tab URL on second line (if I can make it work)
  • A way to open an entire group at once (probably)
  • Page-accessible function to save the current tab without opening the extension pop-up (enables saving via keyboard shortcut, button, etc) (probably)
  • Full-page view of tabs (maybe)
  • Smart automatic naming of groups based on user-defined rules (i.e. two tabs from my.opera.com would make a group named "My Opera") (maybe)
  • Automatic tab grouping based on user-defined rules (i.e. tabs from my.opera.com would be automatically added to the "My Opera" group or create it if it doesn't exist) (maybe)
  • Middle-click to open in background (maybe)

Since I'm rewriting all of the frontend and parts of the backend code, this may take a while to finish.

What I've finished so far:
  • Options page can be opened from pop-up
  • (somewhat tested) back-end support for tab groups
  • Pop-up looks pretty
  • Tabs can be added to the list, trashed, and cleared from the trash
  • Lists and pop-up automatically resize to fit their contents
  • Options page redesigned and mostly finished
  • Should upgrade tabs and some settings to version 2 format (completely untested)
  • Import and export works.
  • Tab group support in the list
  • Clicking on tabs opens them. Ctrl+click to open in background.
  • Drag and drop to page to open tab in current page
  • List scrolls when dragging tabs to top/bottom of list
  • Somewhat buggy middle click to delete (middle click still triggers panning)
  • Drag and drop within the main list or a group
  • Drag tabs in and out of expanded groups
  • Save changes in tab order when tab is dropped
  • Drag tabs onto other tabs or collapsed groups to group
  • Drag groups onto other tabs/groups to merge groups
  • Automatic naming of new groups based on 1st tab in group
  • Click edit button next to group name to edit group title
  • Finish and test 1.x to 2.0 upgrade
  • Help page


What's left to do: