Archive for category code

New HackTheWeb version 1.3.8 – Stylish 1.3.0 Fix

[Updated: 10.0912]

The fix for HTW not “Saving to Stylish” with Stylish 1.3.0, is to update to HTW 1.3.8.

This will be getting pushed out automatically over the next few days.

Latest Version Here: HackTheWeb 1.3.8
______________________________

Details:

Error: NS_ERROR_XPC_NOT_ENOUGH_ARGS: Not enough arguments [stylishStyle.init]
Source File: chrome://hacktheweb/content/hackthewebCommands.js
Line: 227

stylishStyle.js

findSql

style.init(e(“url”), e(“idUrl”), e(“updateUrl”), e(“md5Url”), e(“name”), e(“code”), e(“enabled”), e(“originalCode”), e(“applyBackgroundUpdates”));

hackthewebCommands.js

savescript

var style = Components.classes[“@userstyles.org/style;1”].createInstance (Components.interfaces.stylishStyle);
style.mode = style.CALCULATE_META | style.REGISTER_STYLE_ON_CHANGE;
style.init(null, null, null, null, suggestedName, s, false, null, null);
stylishCommon.openEdit(stylishCommon.getWindowName(“stylishEdit”), {style: style});

______________________________

Not enough arguments so checked what was expected in this version of Stylish and added the extra null, sorted 🙂

Leave a comment

Thoughts on Supercharging HackTheWeb

I am working to add a default action of “Remove” to mouse clicking.

Removing junk from a page is usually the first thing I want to do.
Also as I do “Remove” multiple times, speed and ease of use are key.

So the user clicks the HackTheWeb icon and moves the mouse to red-box an element on the page.

A mouse click and its gone!

___

Note: The normal keystrokes work as well.

😀

, , , , ,

13 Comments

jsbeautifier.org makes a vast difference to readability.

As I am working my way through some ideas for supercharging HackTheWeb, the lack of indentation on some of the code was becoming a serious drag.

Also I wasn’t making the most out of my IDE “Geany” as again indentation matters. 😆

Enter stage left with jsbeautifier, very nice and quite easy to use.

It did seem to insist on CR LF line endings, but that’s not a big deal.

http://jsbeautifier.org


 Update in response to a comment asking for more detail:

Note: I turned on the option to show line endings temporarily…

Fragment of my file before:

// create the main hacktheweb objectLF
var hacktheweb = {LF
resourcePrefix: "chrome://hacktheweb/content/",LF

Fragment of my file after:

// create the main hacktheweb objectCRLF
var hacktheweb = {CRLF
    resourcePrefix: "chrome://hacktheweb/content/",CRLF

As I said no big deal as I did a search on rn and replaced with n

, , ,

4 Comments