Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

quoted law name and statute not rendered #8

Open
clkao opened this issue Jun 25, 2013 · 3 comments
Open

quoted law name and statute not rendered #8

clkao opened this issue Jun 25, 2013 · 3 comments

Comments

@clkao
Copy link

clkao commented Jun 25, 2013

for example: http://lci.ly.gov.tw/LyLCEW/jsp/ldad000.jsp?irKey=&htmlType=agenda&fileName=html/agenda1/01/08/03/01/LCEWA01_080301_00003.htm

"「會計法」第99條之1" should probably still be recognized

@kong0107
Copy link
Owner

Ah.... that seems to be annonying (but frequently seen in goverment's websites). HTML code of that page contains:

This project use DOM tree and consider each text node (nodeType 3) independently. I haven't thought up a good way to merge or detect texts which cross nodes...

@kong0107
Copy link
Owner

Hmm, for document pages 立法院議事暨公報管理系統, the following codes work perfectly as pre-processor:

var ps = document.getElementsByTagName("P");
for(var i = 0; i < ps.length; ++i) ps[i].innerText = ps[i].innerText;

But there seems to be different file at that site. The above page @clkao talked about has htmlType=agenda, and there are other page with htmlType=communique in their URL. Pages with later format seem to be OK with this project, but I don't know whether there are different formats.
...well, the biggest problem is that I've no idea about how to handle such contents.

BTW, the page above has a corresponding page http://lci.ly.gov.tw/LyLCEW/html/agenda1/01/08/03/01/LCEWA01_080301_00003.htm with same content but different background.

kong0107 added a commit that referenced this issue Jun 25, 2013
把「單一條文」改成連向立法院法律系統--之後要再改成讓使用者選。
@kong0107
Copy link
Owner

Codes

var ps = document.getElementsByTagName("P");
for(var i = 0; i < ps.length; ++i) ps[i].innerText = ps[i].innerText;

spend too much time for large documents. Some even reaches 90 seconds for me (AMD Sempron LE-1200, XPSP3).
Modify the code to ps[i].innerHTML = ps[i].innerText; wouldn't help.

Gotta find some other way...

kong0107 added a commit that referenced this issue Jul 1, 2013
Now you can click the button in the popup page!
I don't really know what caused my problem before....

Other modification:
* change name from "法令易讀器" to "法規亦毒氣"; old english name "zhLawEasyRead"
is gone from `manifest.json`, but I haven't decided yet whether to
retain it in cases that only english names are permittable.
* debugged #8 by modifying `ly.lci.js`; I misused
`document.location.pathname` to detect sub-string in search part.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants