buggyj / tiddlyclip

webclipper for tiddlywikis
http://tiddlyclip.tiddlyspot.com/
MIT License
47 stars 4 forks source link

"tiddlyclip -> dock here" context menu stopped working #61

Closed db4 closed 5 years ago

db4 commented 5 years ago

I'm experimenting with tiddlyclip 0.1.3/tiddlyclip-plugin 1.12.2pre on an empty tiddlywiki. Suddenly (after installing some other plugins, setting/resetting password etc.) tiddlyclip stopped working: when I select "tiddlyclip -> dock here" sometimes it's silently ignored, sometimes Firefox Browser Console pops-up:

this.window.gBrowserInit is undefined ext-browser.js:1022
    get activeTab chrome://browser/content/parent/ext-browser.js:1022
    candidates chrome://extensions/content/parent/ext-tabs-base.js:1928
    next self-hosted:1210
    query chrome://extensions/content/parent/ext-tabs-base.js:1947
    next self-hosted:1210
    from self-hosted:599
    query chrome://browser/content/parent/ext-tabs.js:804
    next self-hosted:1210
    query self-hosted:974
    result resource://gre/modules/ExtensionParent.jsm:950
    withPendingBrowser resource://gre/modules/ExtensionParent.jsm:604
    InterpretGeneratorResume self-hosted:1255
    next self-hosted:1210
    result resource://gre/modules/ExtensionParent.jsm:949
    withTiming resource://gre/modules/ExtensionParent.jsm:916
    InterpretGeneratorResume self-hosted:1255
    next self-hosted:1210
    call resource://gre/modules/ExtensionParent.jsm:948
    InterpretGeneratorResume self-hosted:1255
    next self-hosted:1210
unreachable code after return statement tcBrowserchrome.js:205:2
unreachable code after return statement tcBrowserchrome.js:213:2
unreachable code after return statement tcBrowserchrome.js:218:2
The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol. background.html
Error: listener not re-registered ExtensionCommon.jsm:2170:24
Unkown category for SetEventRecordingEnabled.
....

but "tiddlyclip -> dock here" menu always remains empty.

db4 commented 5 years ago

Just tried to open http://tiddlyclip.tiddlyspot.com in antother tab - dock here context menu works there. Maybe I'm using wrong tiddlyclip-plugin (01.14.2pre)?

buggyj commented 5 years ago

no idea... what browser/version are you using?

db4 commented 5 years ago

what browser/version are you using?

Firefox Quantum 66.0.3 (64-bit) on Windows 10

buggyj commented 5 years ago

tiddlyclip will only dock if it thinks that the tab contains a tw. It looks in the meta section at the top of the begging of the file for <meta name="application-name" content="TiddlyWiki" />

db4 commented 5 years ago

I've stepped into

function isTiddlyWiki5() {
    //from tiddlyfox
    // Test whether the document is a TiddlyWiki5 (we don't have access to JS objects in it)
    var doc = document;
    var metaTags = doc.getElementsByTagName("meta"),
        generator = false;
    for(var t=0; t<metaTags.length; t++) {
        if(metaTags[t].name === "application-name" && metaTags[t].content === "TiddlyWiki") {
            generator = true;
        }
    }
    return generator;
}

in JS debugger, it returns true. What else can I check? Maybe enable some debug logging?

buggyj commented 5 years ago

It you reload the tw and right click anywhere and select 'inspect element' from the context menu you should see something like this screenshot (scroll the the bottem of the 'inspector' window) temp If you then click the console tab and then dock you should seen something like this: temp2

If you like you can send me the file so I and take a look.

buggyj commented 5 years ago

Tiddlyclip may not work with encrypted wikis

buggyj commented 5 years ago

tiddlyclip will not work with encrypted wikis because it cannot read the config tiddlers as they are encrypted

db4 commented 5 years ago

Yes, without encryption docking works. So this is absolutely hopeless for encrypted wikis? If yes, can you at least inform user about the problem? (show an error message etc.)

buggyj commented 5 years ago

ok, I am working on tiddlyclip at the moment, so If I can see a workaround I will add to the next release, which will be soon.

buggyj commented 5 years ago

ok I have fixed that - it will be in the next release

db4 commented 5 years ago

Thanks a lot!

db4 commented 5 years ago

Can you release a new version that includes https://github.com/buggyj/tiddlyclip/commit/8c816d36264a520bcf31e11b9f26d1bfbccbf2cd? Also some instructions how to build the extension from sources would be great: ./build.sh seems not to do its job.

buggyj commented 5 years ago

@db4 there is no build required. Just clone the repository and then in ff navigate to 'about:debugging' and click load temporary button and double click on the 'manifest.json'.

I will sign a new version and upload to the releases, for normal installation.

buggyj commented 5 years ago

@db4 new version 0.1.5 is available