Prototype 2 Download For Pc Windows 10

0 views
Skip to first unread message

Natalie Omahony

unread,
Aug 5, 2024, 1:00:25 AM8/5/24
to grevperreta
Iam looking into ways to extend Firefox pop-up blocking from an extension. One option is replacing window.open() (or rather Window.prototype.open()) in the webpage by a wrapper function. An important requirement is that this manipulation cannot be detected or reverted by the webpage. For example, if I simply do this:

The webpage can no longer revert this change but it can still detect it: delete Window.prototype.open normally changes the value of Window.prototype.open (different instance of the same function it seems), here delete won't have any effect at all. Also, Window.prototype.open = "test";delete Window.prototype.open; will produce inconsistent results (different ones depending on whether writable: false flag is specified for the property).


You might try using the nsIWindowWatcher interface to register your own window creator (nsIWindowCreator). That way you can control whether a new window is opened without affecting the window object itself (and thus remaining invisible to web sites).


I'm not sure whether the inability to change the implementation of window.open() without this being detectable is a bug. Perhaps it's just not considered an important requirement for methods like Object.defineProperty. But it might be worth filing a bug to see what others think about making this an option in the future. After all, ad blocking is a major use case.


In the end I had to give up on using JavaScript proxies for the job. Even though with some effort I can create a wrapper for window.open() that behaves exactly like the original (bug 650299 needs to be considered), there doesn't seem to be a proper way to replace the original window.open() function. The changed property will always behave differently from the original one, too bad.


So I decided to go with a different approach as a pop-up blocking solution: listen for content-document-global-created notification and have a look at the subject (the new window) as well as its opener. Windows with a non-null opener are pop-up windows of some kind. One can look at the URLs and decide whether the pop-up should be blocked. To block one would call window.stop() (stops all network activities before any network requests are sent) and window.close(). The latter has to be called asynchronously (with a delay) because it will cause a crash otherwise as the initialization of the window continues. Some notes on this approach:


Sometimes, as a project moves forward, small assumptions and well-intentioned but poor decisions accumulate, turning hours of work into a lousy user experience. The smart teams eliminate their mistakes before they ship by using a technique called UI prototyping. Combined with usability studies, prototypes keep teams headed in the right direction.


Prototyping is a means of exploring ideas before you invest in them. All experienced craftspeople and engineers create prototypes of their work before they build anything: Architects create models out of paper or cardboard, or with virtual reality tools. Aeronautic engineers use wind tunnels. Bridge builders create stress models. Software and Web designers create mock-ups of how users will interact with their designs.


On examining the needs of a particular project, reasons for creating a prototype other than saving money might be found. Is the goal to explore a new interface model? Make modifications to one part of the existing design? Investigate a new technology? Before starting, it's important to be clear about why you're building what you're building. Beginning with clear goals helps make effort direct and effective. The reasons for creating prototypes fall into three basic categories:


Among some teams there are disagreements about the future direction of a project. A prototype can be used to prove that an idea or new approach has merit or value. A prototype can help illustrate that an idea works, express its qualities in a visual and interactive way, and/or motivate team members to think about the problem from another perspective.


If designing interactive software, the only way to explore how something will be used is to create a mock-up and interact with it. Sometimes the mock-up is tied to a usability study, where parts of the prototype can be evaluated in a structured way. Sometimes it's just a way to clearly express to a developer how something should work or look. In many cases, a designer might simply be experimenting, in an effort to get a sense for what approach might work. Anyone on the team can use prototypes to explore design issues, although designers are generally the most skilled. Design explorations should be directed at trying to solve specific problems that are recognized in the product.


Developers investigating implementation approaches to a problem often try out different coding techniques to see if they work well. Using COM+, Dynamic HTML (DHTML), Microsoft Win32, or specific coding approaches within each technology have different tradeoffs. Sometimes a prototype represents an exploration into what technology will work well to support a certain UI feature.


Sometimes prototypes are created for a combination of these reasons. If a team plans well enough, they can allot time for a developer and a designer or project manager to work together on a prototype. In such cases, it's extremely important to clearly define the goals and the contributions each team member is expected to make. Everyone should be clear on what the goals are, what's at stake, and what the potential outcome will be.


Prototyping can be done informally by anyone, regardless of their background or role in the project. It's easy to make a simple but effective prototype by taking a bitmap from Adobe Photoshop, putting it into the Microsoft FrontPage Web site creation and management tool, and adding active buttons or links. These lightweight prototypes only go so far, and can become unwieldy for complex interactions.


For more formal prototypes by larger teams, a developer or project manager will often collaborate with a designer and a usability engineer. Together they'll generate ideas, build a prototype that represents the best ideas, and then go into the lab to see how effective it is in solving user problems. Developers might get involved if they can spare the time, or if their technical expertise is needed. Often the designer or project manager will do most of the scripting or coding to build the prototype.


Depending on the scope of the prototype and the level of detail required, prototypes can be built at any time during the project. Most often they are created early in the project, during the planning and specification phase, before developers write any production code. That's when the need for exploration is greatest, and when the time investment needed is most viable. If developers instead of program managers or designers are prototyping, scheduling time becomes even more important because of the need to make sure the work invested in the prototype is accounted for in the development schedule. Planning for any UI release should include some level of prototyping.


Late in a project, smaller prototypes can help resolve tough design and technical issues. A quick HTML mock-up of how a dialog box or Web page should behave can help answer a developer's question or give other teammates a feel for what the desired experience should be. In some cases, a strong program manager or designer can implement the behavior in Microsoft JScript development software and approximate much of the programming logic that developers will need to think through.


The time it takes to create a prototype can vary tremendously, depending on the scope and precision of what the end result needs to look like. An informal prototype could mean a few hours of work by one person; a more organized effort can involve weeks of effort by an entire team.


In a prototype, build only as much of the design as is needed. It's okay to have buttons that do not work, or text that never updates. As long as the required interactions can be experienced, it's fine to use smoke and mirrors for the rest. Here are a few reasons why efforts should be carefully focused:


The cost involved in building the prototype should be minimized. The challenge with prototyping is recognizing the minimal investment needed to effectively answer questions about the design. This is where usability studies are critical, because they clearly identify the parts of the UI that need the most work. Even without usability studies, clearly define what user problems are being solved, or what tasks are being improved, with the design in the prototype.


Prototypes should have clearly defined lifetimes. Is the end goal a presentation at a team meeting? An executive review meeting? A spec review? A usability study? Identifying that the design solves a user problem? Once the needs for these specific objectives are met, the prototype should be set aside. The basic mindset is that the code or bitmaps generated in a prototype will be left behind. There might be exceptions where code or visuals live on in the product, but the expectation should be that this won't be the case.


Showing prototypes to developers and teammates can be tricky. An overly complex or elaborate prototype, sporting amazing visuals and animation, can overwhelm people. Always have a sense for how far to go and how much of the prototype should be taken seriously.


Starting with an understanding of the key problems or needs of the users (perhaps something a usability engineer has provided) provides an idea about which parts of the UI design warrant the most exploration.


Talk with key developers on the team as the ideas in the prototype are coming together. Get a basic sense for what's reasonable, what's possible, and what is beyond consideration for the next release. In some cases, consider going beyond what they say is possible for one aspect of the design if it's a key point and the team needs to be challenged. However, do not do this with every aspect of your prototype as there is a fine line between pushing the limits and overwhelming your team. If the desire is to inspire the team by showing them a vision for several versions out, then go for it. However, if the requirement is to define specific changes for the next release, then focus efforts on those changes. Make sure to call out the specific changes in a modular way and show developers a path for building the designs.

3a8082e126
Reply all
Reply to author
Forward
0 new messages