| | | |
Offset 13, 15 lines modified | Offset 13, 15 lines modified |
| |
13 | WRITTEN·BY | 13 | WRITTEN·BY |
| |
14 | DATE | 14 | DATE |
| |
15 | SIGNATURE | 15 | SIGNATURE |
| |
16 | December·31,·2023 | 16 | February·1,·2025 |
| |
17 | REVISION·HISTORY | 17 | REVISION·HISTORY |
18 | NUMBER | 18 | NUMBER |
| |
19 | DATE | 19 | DATE |
| |
20 | DESCRIPTION | 20 | DESCRIPTION |
Offset 581, 21 lines modified | Offset 581, 21 lines modified |
581 | 15.4.8·More·ideas·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·44 | 581 | 15.4.8·More·ideas·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·44 |
582 | 16·Scripting·ELinks·with·ECMAScript | 582 | 16·Scripting·ELinks·with·ECMAScript |
| |
583 | 45 | 583 | 45 |
| |
584 | 16.1·Global·Object·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·45 | 584 | 16.1·Global·Object·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·45 |
585 | 16.1.1·Global·Object·Methods·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·45 | 585 | 16.1.1·Global·Object·Methods·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·45 |
586 | 16.1.2·Global·Object·Properties·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·45 | 586 | 16.1.2·Global·Object·Properties·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·46 |
587 | 16.2·ELinks·Object·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·46 | 587 | 16.2·ELinks·Object·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·46 |
588 | 16.2.1·ELinks·Object·Methods·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·46 | 588 | 16.2.1·ELinks·Object·Methods·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·46 |
589 | 16.2.2·ELinks·Object·Properties·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·46 | 589 | 16.2.2·ELinks·Object·Properties·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·46 |
590 | 16.2.3·ELinks·Object·Hooks·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·48 | 590 | 16.2.3·ELinks·Object·Hooks·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·48 |
591 | 16.3·Cache·Object·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·48 | 591 | 16.3·Cache·Object·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·48 |
592 | 16.3.1·Cache·Object·Properties·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·48 | 592 | 16.3.1·Cache·Object·Properties·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·49 |
593 | 16.4·View-state·Object·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·49 | 593 | 16.4·View-state·Object·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·49 |
594 | 16.4.1·View-state·Object·Properties·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·49 | 594 | 16.4.1·View-state·Object·Properties·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·49 |
| |
595 | \xcThe·ELinks·Manual | 595 | \xcThe·ELinks·Manual |
| |
596 | viii | 596 | viii |
| |
Offset 3088, 14 lines modified | Offset 3088, 15 lines modified |
3088 | pipe_read·(command)·Executes·command·and·reads·in·all·the·data·from·stdout,·until·there·is·no·more.·This·is·a·hack,·because | 3088 | pipe_read·(command)·Executes·command·and·reads·in·all·the·data·from·stdout,·until·there·is·no·more.·This·is·a·hack,·because |
3089 | for·some·reason·the·standard·Lua·function·file:read·seems·to·crash·ELinks·when·used·in·pipe-reading·mode. | 3089 | for·some·reason·the·standard·Lua·function·file:read·seems·to·crash·ELinks·when·used·in·pipe-reading·mode. |
3090 | execute·(string)·Executes·shell·commands·string·without·waiting·for·it·to·exit.·Beware·that·you·must·not·read·or·write·to | 3090 | execute·(string)·Executes·shell·commands·string·without·waiting·for·it·to·exit.·Beware·that·you·must·not·read·or·write·to |
3091 | stdin·and·stdout.·And·unlike·the·standard·Lua·function·os.execute,·the·return·value·is·meaningless. | 3091 | stdin·and·stdout.·And·unlike·the·standard·Lua·function·os.execute,·the·return·value·is·meaningless. |
3092 | tmpname·()·Returns·a·unique·name·for·a·temporary·file,·or·nil·if·no·such·name·is·available.·The·returned·string·includes·the | 3092 | tmpname·()·Returns·a·unique·name·for·a·temporary·file,·or·nil·if·no·such·name·is·available.·The·returned·string·includes·the |
3093 | directory·name.·Unlike·the·standard·Lua·function·os.tmpname,·this·one·generates·ELinks-related·names·(currently·with | 3093 | directory·name.·Unlike·the·standard·Lua·function·os.tmpname,·this·one·generates·ELinks-related·names·(currently·with |
3094 | "elinks"·at·the·beginning·of·the·name). | 3094 | "elinks"·at·the·beginning·of·the·name). |
| |
3095 | Warning | 3095 | Warning |
3096 | The·tmpname·function·creates·the·file·but·does·not·guarantee·exclusive·access·to·it:·another·process·may·delete | 3096 | The·tmpname·function·creates·the·file·but·does·not·guarantee·exclusive·access·to·it:·another·process·may·delete |
3097 | the·file·and·recreate·it.·This·exposes·you·to·symlink·attacks·by·other·users.·To·avoid·the·risk,·use·io.tmpfile | 3097 | the·file·and·recreate·it.·This·exposes·you·to·symlink·attacks·by·other·users.·To·avoid·the·risk,·use·io.tmpfile |
3098 | instead;·unfortunately,·it·does·not·tell·you·the·name·of·the·file. | 3098 | instead;·unfortunately,·it·does·not·tell·you·the·name·of·the·file. |
| |
3099 | bind_key·(keymap,·keystroke,·function)·Currently,·keymap·must·be·the·string·"main".·Keystroke·is·a·keystroke·as·you | 3099 | bind_key·(keymap,·keystroke,·function)·Currently,·keymap·must·be·the·string·"main".·Keystroke·is·a·keystroke·as·you |
3100 | would·write·it·in·the·ELinks·config·file·~/.config/elinks/elinks.conf.·The·function·function·should·take | 3100 | would·write·it·in·the·ELinks·config·file·~/.config/elinks/elinks.conf.·The·function·function·should·take |
Offset 3324, 21 lines modified | Offset 3325, 22 lines modified |
| |
3324 | Printing·a·web·page·with·ELinks·usually·involves·quite·a·few·steps:·Save·the·current·document·onto·disk.·Run·it·through·ELinks | 3325 | Printing·a·web·page·with·ELinks·usually·involves·quite·a·few·steps:·Save·the·current·document·onto·disk.·Run·it·through·ELinks |
3325 | on·the·command-line·(so·it·fits·into·80·columns)·to·generate·a·plain·text·version.·Remove·the·80th·column·from·the·text·version, | 3326 | on·the·command-line·(so·it·fits·into·80·columns)·to·generate·a·plain·text·version.·Remove·the·80th·column·from·the·text·version, |
3326 | as·it·will·make·printers·wrap·down·to·the·next·line.·Finally,·run·the·processed·file·through·`lpr’,·then·delete·it. | 3327 | as·it·will·make·printers·wrap·down·to·the·next·line.·Finally,·run·the·processed·file·through·`lpr’,·then·delete·it. |
3327 | The·following·functions·allow·you·to·print·web·pages·directly·from·ELinks,·using·lpr’·or·`enscript’.·Type·`lpr() | 3328 | The·following·functions·allow·you·to·print·web·pages·directly·from·ELinks,·using·lpr’·or·`enscript’.·Type·`lpr() |
3328 | or·enscript()·in·the·Lua·Console·to·run·them.·(In·the·hooks.lua,·I·have·also·made·it·so·you·can·just·type·lpr·or | 3329 | or·enscript()·in·the·Lua·Console·to·run·them.·(In·the·hooks.lua,·I·have·also·made·it·so·you·can·just·type·lpr·or |
3329 | enscript.) | 3330 | enscript.) |
3330 | Note | |
3331 | The·io.popen·function·is·not·available·on·all·platforms. | |
| |
3332 | \xcThe·ELinks·Manual | 3331 | \xcThe·ELinks·Manual |
| |
3333 | 44·/·49 | 3332 | 44·/·49 |
| |
| 3333 | Note |
| 3334 | The·io.popen·function·is·not·available·on·all·platforms. |
| |
3334 | function·pipe_formatted_to·(program) | 3335 | function·pipe_formatted_to·(program) |
3335 | local·lp,·errmsg·=·io.popen·(program,·"w") | 3336 | local·lp,·errmsg·=·io.popen·(program,·"w") |
3336 | if·lp·==·nil·then | 3337 | if·lp·==·nil·then |
3337 | error·(errmsg) | 3338 | error·(errmsg) |
3338 | else | 3339 | else |
3339 | lp:write·(current_document_formatted·(79)) | 3340 | lp:write·(current_document_formatted·(79)) |
3340 | lp:close·() | 3341 | lp:close·() |
Offset 3380, 23 lines modified | Offset 3382, 23 lines modified |
3380 | Hierarchical·bookmarks),·and·also·to·be·able·to·view·them·and·search·for·them·in·an·HTML·page.·I·have·written·an·alternative | 3382 | Hierarchical·bookmarks),·and·also·to·be·able·to·view·them·and·search·for·them·in·an·HTML·page.·I·have·written·an·alternative |
3381 | bookmark·system·(for·ELinks),·which·some·people·may·like·better·than·the·standard·bookmark·system. | 3383 | bookmark·system·(for·ELinks),·which·some·people·may·like·better·than·the·standard·bookmark·system. |
3382 | 15.4.8 | 3384 | 15.4.8 |
| |
3383 | More·ideas | 3385 | More·ideas |
| |
3384 | •·The·Lua·interface·needs·to·be·redesigned·to·provide·more·flexible,·coherent·and·usable·interface·to·the·scripts. | 3386 | •·The·Lua·interface·needs·to·be·redesigned·to·provide·more·flexible,·coherent·and·usable·interface·to·the·scripts. |
3385 | •·Cliff·Cunnington·had·a·neat·idea·of·clipping·text·that·you·see·in·web·pages·(you·enter·a·regexp·that·will·match·the·start·and | |
3386 | end·of·the·text·you·want·to·clip),·and·saving·the·text·to·disk,·along·with·the·URL·and·timestamp.·This·would·help·if·you·find | |
3387 | that·you·can’t·ever·remember·where·you·had·seen·a·piece·of·text,·or·if·you·want·to·keep·a·piece·of·information·but·don’t·need | |
3388 | to·save·the·entire·page. | |
| |
3389 | \xcThe·ELinks·Manual | 3387 | \xcThe·ELinks·Manual |
| |
3390 | 45·/·49 | 3388 | 45·/·49 |
| |
| 3389 | •·Cliff·Cunnington·had·a·neat·idea·of·clipping·text·that·you·see·in·web·pages·(you·enter·a·regexp·that·will·match·the·start·and |
| 3390 | end·of·the·text·you·want·to·clip),·and·saving·the·text·to·disk,·along·with·the·URL·and·timestamp.·This·would·help·if·you·find |
| 3391 | that·you·can’t·ever·remember·where·you·had·seen·a·piece·of·text,·or·if·you·want·to·keep·a·piece·of·information·but·don’t·need |
| 3392 | to·save·the·entire·page. |
3391 | •·People·who·use·download·management·programs·could·write·a·function·to·send·the·current·link·to·their·favourite·downloading | 3393 | •·People·who·use·download·management·programs·could·write·a·function·to·send·the·current·link·to·their·favourite·downloading |
3392 | program. | 3394 | program. |
3393 | •·If·you·wrote·a·small·C·program·to·put·text·into·the·X11·selection·clipboard,·you·could·pass·the·current·link·or·URL·to | 3395 | •·If·you·wrote·a·small·C·program·to·put·text·into·the·X11·selection·clipboard,·you·could·pass·the·current·link·or·URL·to |
3394 | that·program,·to·make·it·easier·to·paste·URLs·into·other·windows.·It·might·be·possible·to·do·the·same·with·GPM,·or·the | 3396 | that·program,·to·make·it·easier·to·paste·URLs·into·other·windows.·It·might·be·possible·to·do·the·same·with·GPM,·or·the |
3395 | KDE/GNOME·equivalents. | 3397 | KDE/GNOME·equivalents. |
3396 | •·Send·the·current·page·to·Babelfish·for·translation. | 3398 | •·Send·the·current·page·to·Babelfish·for·translation. |
3397 | •·Look·for·stupid·JavaScript·URLs·and·convert·them·to·something·usable. | 3399 | •·Look·for·stupid·JavaScript·URLs·and·convert·them·to·something·usable. |
Offset 3409, 14 lines modified | Offset 3411, 15 lines modified |
| |
3409 | As·a·user·of·ELinks,·you·can·control·its·behaviour·by·writing·scripts·in·ECMAScript.·Unlike·scripts·in·SCRIPT·elements·of | 3411 | As·a·user·of·ELinks,·you·can·control·its·behaviour·by·writing·scripts·in·ECMAScript.·Unlike·scripts·in·SCRIPT·elements·of |
3410 | HTML,·these·user·scripts·run·with·all·the·permissions·of·your·user·account,·the·same·as·with·Lua.·The·object·model·is·very | 3412 | HTML,·these·user·scripts·run·with·all·the·permissions·of·your·user·account,·the·same·as·with·Lua.·The·object·model·is·very |
3411 | different·too. | 3413 | different·too. |
3412 | Support·for·ECMAScript·user·scripts·was·first·added·in·ELinks·0.11.0.·The·configure·script·enables·it·by·default·if·the | 3414 | Support·for·ECMAScript·user·scripts·was·first·added·in·ELinks·0.11.0.·The·configure·script·enables·it·by·default·if·the |
3413 | required·SpiderMonkey·library·has·been·installed,·but·you·can·disable·it·with·configure·--disable-sm-scripting·or | 3415 | required·SpiderMonkey·library·has·been·installed,·but·you·can·disable·it·with·configure·--disable-sm-scripting·or |
3414 | by·editing·features.conf. | 3416 | by·editing·features.conf. |
| |
3415 | Warning | 3417 | Warning |
3416 | ECMAScript·scripting·is·still·a·bit·experimental:·there·seem·to·be·ways·to·crash·ELinks·with·it,·and·the·object·model | 3418 | ECMAScript·scripting·is·still·a·bit·experimental:·there·seem·to·be·ways·to·crash·ELinks·with·it,·and·the·object·model |
3417 | may·change.·However,·if·you·don’t·have·a·hooks.js·file,·there·is·not·much·risk·in·enabling·the·feature·at·compile | 3419 | may·change.·However,·if·you·don’t·have·a·hooks.js·file,·there·is·not·much·risk·in·enabling·the·feature·at·compile |
3418 | time. | 3420 | time. |
| |
3419 | When·ELinks·starts·up,·it·evaluates·the·ECMAScript·file·hooks.js·in·your·ELinks·configuration·directory·(thus·normally | 3421 | When·ELinks·starts·up,·it·evaluates·the·ECMAScript·file·hooks.js·in·your·ELinks·configuration·directory·(thus·normally |
3420 | ~/.config/elinks/hooks.js·on·Unix-like·systems),·or·if·the·file·does·not·exist·there,·then·in·the·system-wide·ELinks | 3422 | ~/.config/elinks/hooks.js·on·Unix-like·systems),·or·if·the·file·does·not·exist·there,·then·in·the·system-wide·ELinks |
Offset 3434, 27 lines modified | Offset 3437, 28 lines modified |
3434 | Global·Object·Methods | 3437 | Global·Object·Methods |
| |
3435 | do_file(path)·Load·and·evaluate·the·file·with·the·given·path·(string).·For·example: | 3438 | do_file(path)·Load·and·evaluate·the·file·with·the·given·path·(string).·For·example: |
3436 | do_file("/home/me/.config/elinks/hooks.js"); | 3439 | do_file("/home/me/.config/elinks/hooks.js"); |
Max diff block lines reached; 5317/12569 bytes (42.30%) of diff not shown.
|