diff --git a/website/src/component/container/App/App.js b/website/src/component/container/App/App.js index 4d93a6d..4417857 100644 --- a/website/src/component/container/App/App.js +++ b/website/src/component/container/App/App.js @@ -56,14 +56,14 @@ export default class App extends React.Component { <a href="https://github.com/azu/morpheme-match">morpheme-match</a> -

形態素解析したトークンを元に、文章にマッチするトークンが含まれているかをチェックするライブラリのデモ

+

形態素解析したトークンを元に、文章にマッチするトークンが含まれているかをチェックするライブラリのデモ

-
diff --git a/website/src/component/project/AnalyzedJSONField/AnalyzedJSONField.js b/website/src/component/project/AnalyzedJSONField/AnalyzedJSONField.js index 87aff13..e203400 100644 --- a/website/src/component/project/AnalyzedJSONField/AnalyzedJSONField.js +++ b/website/src/component/project/AnalyzedJSONField/AnalyzedJSONField.js @@ -7,7 +7,7 @@ export default class AnalyzedJSONField extends React.Component { const permanentURL = this.props.permanentURL; const value = `// ${permanentURL} ${outputJSON} -` +`; return

diff --git a/website/src/js/store/analyzer/AnalyzerState.js b/website/src/js/store/analyzer/AnalyzerState.js index 0d9fae6..9cd8670 100644 --- a/website/src/js/store/analyzer/AnalyzerState.js +++ b/website/src/js/store/analyzer/AnalyzerState.js @@ -39,14 +39,6 @@ export default class AnalyzerState extends ReduceState { } } - // return "" - get permanentURL() { - const origin = window.location.protocol + "//" + window.location.hostname + (window.location.port - ? ":" + window.location.port : ""); - const hash = this.currentText ? `#${this.currentText}` : ""; - return `${origin}${window.location.pathname}${hash}`; - } - get outputJSON() { return JSON.stringify(this.tokens, null, 4); } diff --git a/website/src/js/store/routing/RoutingState.js b/website/src/js/store/routing/RoutingState.js index 34d57df..bad9f10 100644 --- a/website/src/js/store/routing/RoutingState.js +++ b/website/src/js/store/routing/RoutingState.js @@ -9,6 +9,13 @@ export default class RoutingState extends ReduceState { this.text = queryObject.text; } + get currentURL() { + const origin = window.location.protocol + "//" + window.location.hostname + (window.location.port + ? ":" + window.location.port : ""); + const query = this.text ? `?text=${this.text}` : ""; + return `${origin}${window.location.pathname}${query}`; + } + reduce(payload) { switch (payload.type) { case ChangeURLStateUseCase.Events.change: