You need to be logged in to post in the forums. If you do not have an account, please sign up first.
« Prev 1 2 3 4 5 6 7 ... 9 Next »
MultiPopup, a customization for Tooltips for Opera
Hi, I want to move the thread in wish list named 'nice titles' to here with a proper name, as Multipopup was constantly mistaken for nice titles, and this place is better suited to it.Multipopup is a User Javascript which waits until the page is loaded, and displays a stylish animated tooltip which can be fully customized (Animation speed, animation turn on / off, graphic styles can be edited).
You can download it and find more info on it on:
Multipopup UserJS version
Here you'll always find the latest version of the script.
edit:
Problem solved, no site detection necessary. I did some changes I should have done LONG ago, and now the site does not break, but because of the innerHTML rewrite of the entire body seen on the site, the popups will not be shown. Uploading in a few moments.
1.9 Beta Revision 10
This is a very important update, everybody using Multipopup should immediately download this if they want to visit htmldog.com
http://www.hesido.com/test/webdesign/multipopupdemopage.htm
It fixes the problems with sites that have ultra disgusting browser-detects that don't actually work and use invasive javascript rewriting of the whole site based on those false findings

But anyway, due to this problem, I changed a portion of the multipopup script that I should have changed LONG ago. I was writing the popup information in attributes instead of writing them in a variable tied to the element.
(Embarresment at its highest.) This finally caused problems with a site.Dantesoft, I thank you so much

Now, as the whole page at htmldog.com is rewritten, all the popup information is trashed. In a future release, I could put a multipopup option to rerun the script with user interaction. But I think we could live with not seeing popups at some sites which use such techniques
(please keep your status bar open for these times
)Originally posted by thukai
D.I.Z. is it possible to make the old fashion yellow pop-up to be less transparent?
Thanks.
Yep, of course it is. I will make some version with different transparency.
Small bug: mPUserJS.forceWordWrap is declared two times in preferences file.
Now another issue: on http://unitedmedia.com/comics/peanuts/archive/peanuts-20050807.html the multipopup script seems to hide the read pages (the visited link in the calendar) until I hover them.
Can you investigate?
PS: v1.9 beta10

That was something I noticed, it does not always happen. But after you reported it, I inquired it a bit more (just in these 5 mins).
Here are my findings: It is most probably an Opera bug, and caused by adding an element to the header. There could be more to it than this but this is the case. So the workaround is:
Copy the user.css to somewhere appropriate from the archive
activate it from preferences -> advanced -> content for author pages, or append to your browser or user css if you already have it.
mPUserJS.useDefStyle = false;
Reload for user.css to take effect.
Then the internal styles won't be used, meaning no style element will be attached to the header.
I'll see what I can do about this, but it does seem to be an Opera bug. And opera has no DOM methods currently for adding styles properly. There's not much I can do about it. But I'm glad there is a workaround. I'll post this on my site when I have the time..
edit2: If internal styles won't be used, this also means you cannot have custom skins unless you put them manually to your user.css. Diz has already provided the CSS version of his skin somewhere in this thread. I would advise any other skin author (BtEO, where are you?
) to also provide a CSS version for people who wouldn't like this bug to happen.edit: and I don't think Opera will be implementing those anytime soon or fix this bug. But if anyone wants to report it , it may be sth. like: Sometimes, Opera considers visited links as unvisited until you hover over them, if a script modifies the header (adds extra style, maybe??) . I currently have not time to find anything more specific than this.
Problem is it doesn't seem to work all the time.
On a couple of sites I visit it seems to be pot luck whether the delay kicks in or not. Most notably on thi forum.
After a bit of investigation it seems to only be causing a problem when I switch pages, if I don't click somewhere on the page then the tooltips show instantly but if I click on the page then the delay kicks in.
Two questions, is it possible to correct this small annoyance and if it isn't how hard would it be to modify the userjs not to show tooltips?
That's the way I use it.
Edit this in your prefs file.
mPUserJS.attDPri = [false,false,false,false];
//View in Primary Popup View?
mPUserJS.attDSec = [true,true,true,true];
//View in Secondary Popup view? (Secondary view is activated by pressing 'control')
This way the pop-up only display pressing CTRL.
The trues and the falses relate to this;
mPUserJS.attDesc = ['title','alt','href','src'];
//the attribute names that contain popup information.

At first I've to say that you did a great job with this tool. I'm using it for a few weeks now and I really appreciate it!!
But now I have a question: I'm using the script primarily to let Opera show ALT-Attributes (just like IE does). I know, this is a false behaviour, but many websites don't use TITLE-Attributes so sometimes I miss descriptions of important buttons for example.
Luckily, MultiPopup changed this.
But if a site uses TITLE AND ALT together, Multipop would show me the same text twice... I could modify the script so that it shows me TITLE in primary mode and ALT in secondary mode.. But wouldn't it be nicer to enable the script to show only the TITLE (if any), and to show ALT just in case there is NO TITLE (without having to press a button)

-Draal
Edit: Modules.. Hmm.. Preferences file is a module too. So it the skin file. I guess we'd have no problems kicking modules into action using a simple array that stores the name of the modules to those functions. Function names could preferably start with mPOP to greatly reduce the chances of clashes. There could be two type of modules, one gets run prior to Mpop, one after.
I am currently in the process of making Multipopup GreaseMonkey compatible, I am reducing the number of global functions and changing their name.
[PHP]function generujTitleZAlt() {
var obrazki=document.getElementsByTagName('img');
for (var i=0; i < obrazki.length; i++) {
if (!obrazki.title && obrazki.alt) {
obrazki.setAttribute('title',obrazki.alt + ' [alt]');
}
}
}
document.addEventListener('load', generujTitleZAlt, false);[/PHP]
Variable and function names are in Polish as this was created by some polish user but you'll get the idea

I am currently in the process of making Multipopup GreaseMonkey compatible, I am reducing the number of global functions and changing their name.
I'm very happy to hear it. Recently I tried to run your script in newest Greasemonkey and it didn't want to show anything. Wanted to try it and see how performance compares to Opera.
edit: didn't noticed that it's for images only. Anyway, not a lot of work to modify it
http://www.scss.com.au/family/andrew/opera/userjs/alt2title.js
// ==UserScript==
// @name Image Alt to Title Attributes
// @namespace [url]http://www.scss.com.au/family/andrew/opera/userjs/[/url]
// @version 1.1
// @date 2005-05-08
// @author Andrew Gregory <andrew at scss dot com dot au>
// @description Copies image alt attributes to the title (for tooltips).
// @include *
// ==/UserScript==
// License: [url]http://creativecommons.org/licenses/by-nc-sa/2.0/[/url]
// Notes: Does not replace an existing title attribute. If the image
// doesn't have alt text, it is given a single character (an 'X' in
// a circle).
document.addEventListener('load', function() {
var i, imgs, fix = function(img) {
if (img.hasAttribute('alt')) {
if (!img.hasAttribute('title')) {
img.setAttribute('title', img.getAttribute('alt'));
}
} else {
img.setAttribute('alt', '⊗');
}
};
imgs = document.getElementsByTagName('img');
for (i = 0; i < imgs.length; i++) fix(imgs[i]);
imgs = document.getElementsByTagName('input');
for (i = 0; i < imgs.length; i++) {
if (imgs[i].hasAttribute('type') && imgs[i].getAttribute('type').toLowerCase() == 'image') fix(imgs[i]);
}
}, false);
If not, ditch the document.addEventListener, just give the function a name, and make it run in multipopup() function before anything..
It could stay in its seperate file like modules would do when I implement that feature.
I guess you can take diz's script , change ['img'] to ['*'], *REMOVE* the addeventlistener line,
Then In multipopup,
find function Multipopup() {
generujTitleZAlt()
...
}
This should do, or wait until I prepare the module infrastructure.
Edit:
Oh, it works, then we're lucky

Igoring on pattern match is possible, but I am afraid the feature requests became just *too specific* lol!
That might be dealt with in future tho. I don't want to maintain a no-multipopup zone list. People who think it causes problems could switch to the no attributes in primary solution that you have mentioned, and get a voluntary popup with CTRL. With all the latest bug fixes, it does not cause any vital problems with any sites.16. August 2005, 13:34:30 (edited)

I'd like to inform you that the greasemonkey ready version is near its completion, but I added new features on the way, so Opera users gain actually more from mpopup. I will add module support so:
DIZ, is that alt to title script yours? can I include it as the first 'official' module? - edit, oh, it isn't yours, I'll only slightly modify the one by Andrew Gregory (it is under creative commons..)
Future modules programmed by me or other people may add functions like blocking mpopup from running for certain sites, adding an on the fly menu to refresh popups etc.
Modules will allow us, to some extent, add some new features without having to update the whole script. (Of course, you can't do it all with modules, but it'll be nice.)

The update is nearing completion. Here is a teaser of what to expect (and for me to copy paste to hesido.com when time comes
:Apparent Changes:
*Animation update bugs of Firefox are fixed.
*Scroll Bar Appearing bug when previous tooltip bigger on Firefox are fixed.*
Firefox, so what, I can hear you say :=) What these two paved the way for Opera ->
*Exceptional performance on every site, no matter what CSS is being used, or how complex the site is! (No offsetWidth/Height reads are used anymore, so the script is not affected by the dreaded and rather irrelevant Opera a:visited style bug!)
*Global variable (only activated on presence of external preferences or skin) name changed to mpUSRJS and external preferences / skin handling is changed for grease monkey compatibility and the ability to go into impenetratable mode (on users will), so the old prefs and skin files will not work. The bundled external skin is updated for changes. For your own custom skin files, the changes are minor, so editing a few lines would suffice, don't worry. This system is not to change anymore, I hope.
Technical Changes (under the hood):
*Bug detection, not browser detection: Firefox animation bug fixing codepath only activated upon detection of the bug, so Opera does not have to execute that path, or Firefox when its bugs are fixed. (This is a nice side effect of the no-browser detect policy.)
*Single global function that can't be overwritten (always works)
*No global variables if the user has no external prefs / skin (Auto decide using a global function based on the presence of external prefs.)
*Ability to be suppressed by the remote webpage (if the user allows) (As no overwritable functions are used, I had to put a mechanism so you don't get double popups for websites that used the same popup 'technology')
*Ability for websites to suppress the auto primary view (if so, popups are only displayed voluntarily by keypress, this is to avoid clashes for your sites that uses *other* popup 'technology', but when still don't want to suppress the remote )
*GreaseMonkey support
The code path has changed so much, I am not going to release it before testing it for a few more hours

Because this javascript may somehow find its page on webpages, and because of the order that greasemonkey onload functions are run, I had to devise methods for graceful suppression of the script. The suppression methods are there for Multipopup fans who are doing their own site and potentially using the multipopup family scripts.
There won't be many I am sure, but I felt I had to build a firm base.Much of the time went on deciding and coding for the method to use no global variables and functions while still being able to change to using the global variable to use external prefs when needed. This created quite a chaos! If the website potentially attached same type of events once the global variable mode was activated on the user side (like it happens on the demo page), anonymous or non-global no-overwrite functions meant running the same type of scripts twice while adding event attachments twice and the fact that greasemonkey type onload functions getting run *after* pages own onload javascripts meant that a total suppression was needed for pages that used the same technology or potential future sites that would use the same functions on the server side), and extra functions were required to be able to detach events from a previously executed script, functions that are run in previously executed scripts scope, which also allows for refreshing of the event attachments in a no global function environment

So much of the time went on fixing / devising methods for things that could happen once every 4 years or so, and almost always on the demo page
But I am really glad I went-around that awful a:visited opera bug with box-model, CSS-style, Browser-agnostic methods, now the script is performing superbly on all the sites.I will release it after proper packaging

Version 2.0 Online
I hope I haven't screwed this one up..http://www.hesido.com/test/webdesign/multipopupdemopage.htm
*Please remove ALL previous Multipopup files from your UserJS directory!*
Forgot to mention on the page there.
There is also 'module' support, which I forgot to tell you in the changes I mentioned. The first included module is Andrew Gregory's "alt to title" and it is a prerun module. (It is included in the module system is there just to ensure it gets run before multipopup, no need to install it if your current setup handles things fine, or you don't want alt to title functionality of course
)I am not sure if this is newly introduced, but I noticed random slowdowns on page initializing with Opera. This seems to be rare problem tho. It is most probably an Opera bug and I hope it won't be seen on other systems. The problem is not with the popup motion or anything, the first initializing sometimes takes a lot of time for no particular reason (On the very same page I used for testing this 'bug'.) I am not sure if this is new tho. It may be hard to notice.
The same files are used for both FF and Opera. While I got around the slowdowns due to CSS styles, I see there is still some bit of a slowdown (tho much less, luckily) on certain pages. It may be due to that bug of Opera not only slowing down just style reading, but style setting as well, or sth else I can't come up with
)Anyway, Opera performance is drastically improved, hope you like it.
Unfortunately I'm experiencing problems that you mentioned before. Sometimes it takes quite long to initialize the script. I guess the script is walking through the DOM tree and is reading/adding attributes. It seems to be a bigger problem in this version than in previous. Actually, in previous version it was very noticable when there was a lot of links (or images or other elements) on page (limiting mpUSRJS.attDPri and/or attDSec helped a lot). But now it happens even if there isn't very much links/elements on page.
And another problem, alt2title_mpopmodule.user.js generates a lot of errors. Something will null value. Javascript console tells something about error on line 40 but it does not even have that much lines so I'm not sure what's the problem is and I didn't have time to investigate.
Besides that, it works faster, great work. And it works in Firefox. I don't know how to turn off original tooltips there though
DIZ, I don't know why the inital phase sometimes gets longer. It doesn't happen all the time, it goes away when I restart Opera. I am guessing it might be a strange Opera bug. The old one assigned global functions, this doesn't, maybe that was it, but then again, why does it also slow down alt2title. (I did alert() debugs and almost all dom parsing activities seem to slow down, so alt2title was slow too) . It seems to happen more when there are many pages open. To test it, if you realize the slowdown on a page, save with images, open it back. Watch out the cpu usage in task manager. Cpu usage goes up for a good while.. Close all pages, turn off opera, reload opera and the page.. It is very probable you don't notice that initializing slowdown.
I'll try a couple of things. I hope it is still useable in this state.
To turn off tooltips on FF, type in about:config and filter toolbar_tips ; make it false
By the way, I updated to 2.01 for firefox, (no reason to dl it for opera) I couldn't update the page but there it is. It fixes a stupid firefox related bug.Originally posted by hesido
I'll try a couple of things. I hope it is still useable in this state.
To turn off tooltips on FF, type in about:config and filter toolbar_tips ; make it falseBy the way, I updated to 2.01 for firefox, (no reason to dl it for opera) I couldn't update the page but there it is. It fixes a stupid firefox related bug.
Yes, it's usable.
About that ff bug... popups were sometimes to wide but you fixed it now, thanks

And thanks for the tip how to turn off tooltip
That stupidness of FF comes from the fact that, when it makes a word-wrap, it does not shrink the container even if it no more needs that extra space, so the container is still big enough to contain up to the character that caused the word break in the previous line. Good news is this only creates popups slightly bigger than it could have been.
Also, on firefox, animations are not as solid as with Opera. But I haven't updated the page yet.. I am moving the page to PHP, but I can't know a decent way to do a redirect that won't screw my Google performance
(.htaccess file does not work.., and some say meta refresh is just what google guys hate. (Maybe with "noindex, follow", there would not be problems??)BTW, I did not notice any slowdowns in firefox, in such manner.
edit: There definitely is a relation between number of pages open, and the browsing time maybe.. On this very page, I noticed the slowdown. I immediately saved with images.. Tested the cpu usage with taskmanager, 100% cpu usage went on for a good 4 seconds for every reload, I repeated the reload 3-4 times. I then closed all other windows.. The first reload took sth like 2 seconds, and the subsequnt ones took <0.5 secs for each reload. Opera kind of got back to itself.. This is most definitely an Opera problem, aggravated by my lousy programming.
What ever the problem was, it seems to be aggravated now.
18. August 2005, 09:29:00 (edited)
Did you remove all previous multipopup related files? the file names have changed..
If you think you did everything fine, is there any other details you can share?
Edit:
Notes to DIZ: The Initializing slowness goes away, soon as you close all other windows. I guess we are against a real strange Opera bug here. But I can't see any practical method to report it, and I highly doubt the Opera team would install Multipopup just to test this. All I can say is, while Multipopup may be invoking it, it affects all the rest of the scripts on page, it is serious, in that sense.
Opera people mentioned that browser javascript is off by default because of some performance issues. Maybe it has something to do with what we see now with multipopup.
It works on the Opera forums and Yahoo and the demo page.
I am using the preferences file and the included js skin file. Changes to either file are appropriately reflected on the aforementioned sites.
Doesnt work on pretty much anything else, even local files
Not sure why, there are no script errors or anything
Cant say much more as I've only just installed it and cant test it out anymore today
Using Opera 8.02 build 7680
Can you prepare a basic list of some sites that does not work??
Thanks in advance.
I hope I don't have to go back to the old system, but with all these problems, I may have to.
The Greasemonkey version would be a separate version then, makin it all the worse to keep developing.. I have not yet declared it in any FF related forums. Until we can decide to have an Opera specific and Greasemonkey specific versions as seperate distributions, I think I won't.
« Prev 1 2 3 4 5 6 7 ... 9 Next »
Showing topic replies 101 - 150 of 436.