差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン 次のリビジョン両方とも次のリビジョン | ||
start [2022/09/23 20:59] – ともやん | start [2022/11/27 03:27] – ともやん | ||
---|---|---|---|
行 1: | 行 1: | ||
< | < | ||
- | <script src="/_media/javascript/requirejs/require-2.3.6.min.js? | + | <script src="https://cdn.jsdelivr.net/npm/vue@3/dist/vue.global.min.js"></ |
- | < | + | <script src="/ |
- | // | + | |
- | var startTime = Date.now(); | + | |
- | | + | |
- | <script src="/ | + | |
<!-- Tomoyan.net Vue.js app start --> | <!-- Tomoyan.net Vue.js app start --> | ||
+ | < | ||
< | < | ||
# | # | ||
行 31: | 行 28: | ||
<WRAP prewrap 100% # | <WRAP prewrap 100% # | ||
< | < | ||
- | <div id="tomoyan_net_app"> | + | <div id="tomoyan_net-app"> |
</ | </ | ||
^ IP アドレス (< | ^ IP アドレス (< | ||
行 38: | 行 35: | ||
^ [[https:// | ^ [[https:// | ||
^ ダークモード\\ < | ^ ダークモード\\ < | ||
- | ^ [[https:// | + | ^ [[https:// |
^ [[https:// | ^ [[https:// | ||
- | < | ||
< | < | ||
</ | </ | ||
<!-- Tomoyan.net Vue.js app end --> | <!-- Tomoyan.net Vue.js app end --> | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | const { createApp } = Vue | ||
+ | let ua_parser; | ||
+ | const tomoyan_net_app = createApp({ | ||
+ | data() { | ||
+ | return { | ||
+ | remote_addr: | ||
+ | cpu_cores: '', | ||
+ | display_resolution: | ||
+ | browser_resolution: | ||
+ | user_agent: navigator.userAgent, | ||
+ | ua_parser: '', | ||
+ | versions: '', | ||
+ | vue_ver: Vue.version, | ||
+ | } | ||
+ | }, | ||
+ | created() { | ||
+ | this.get_display_resolution(); | ||
+ | this.get_cpu_cores() | ||
+ | |||
+ | window.UAParser = UAParser; | ||
+ | let ua_result = ua_parser = new UAParser(); | ||
+ | let ua_json = ua_result.getResult(); | ||
+ | this.ua_parser = JSON.stringify(ua_json, | ||
+ | |||
+ | this.versions = ' | ||
+ | ' | ||
+ | }, | ||
+ | computed: { | ||
+ | ip_ver() { | ||
+ | return REMOTE_ADDR.indexOf(':' | ||
+ | }, | ||
+ | dark_mode() { | ||
+ | if (matchMedia(' | ||
+ | return ' | ||
+ | } | ||
+ | else { | ||
+ | return matchMedia(' | ||
+ | } | ||
+ | }, | ||
+ | }, | ||
+ | methods: { | ||
+ | get_display_resolution() { | ||
+ | this.display_resolution = screen.width + ' x ' + screen.height; | ||
+ | this.browser_resolution = window.innerWidth + ' x ' + window.innerHeight; | ||
+ | }, | ||
+ | get_cpu_cores() { | ||
+ | this.cpu_cores = (!!navigator.hardwareConcurrency ? | ||
+ | navigator.hardwareConcurrency : | ||
+ | '' | ||
+ | }, | ||
+ | }, | ||
+ | mounted() { | ||
+ | window.onload = () => { | ||
+ | let diffLoadTime = Date.now() - startTime; | ||
+ | console.log(' | ||
+ | } | ||
+ | / | ||
+ | let diffReadyTime = Date.now() - startTime; | ||
+ | console.log(' | ||
+ | }*/ | ||
+ | }, | ||
+ | setup() { | ||
+ | window.addEventListener(' | ||
+ | }, | ||
+ | beforeDestroy() { | ||
+ | window.removeEventListener(' | ||
+ | }, | ||
+ | }).mount('# | ||
+ | </ | ||
</ | </ | ||
</ | </ | ||
行 67: | 行 136: | ||
====== Dokuwiki Top ====== | ====== Dokuwiki Top ====== | ||
<php> | <php> | ||
- | function curlGet($url) { | + | function curlGet($url, $referer='' |
$curl = curl_init(); | $curl = curl_init(); | ||
| | ||
行 74: | 行 143: | ||
curl_setopt($curl, | curl_setopt($curl, | ||
curl_setopt($curl, | curl_setopt($curl, | ||
+ | curl_setopt($curl, | ||
| | ||
$response = curl_exec($curl); | $response = curl_exec($curl); | ||
行 82: | 行 152: | ||
//$json = curlGet(' | //$json = curlGet(' | ||
- | $json = curlGet(' | + | //$json = curlGet(' |
- | $json = mb_convert_encoding($json, ' | + | //$json = curlGet(' |
+ | $html = curlGet(' | ||
+ | //$html = curlGet(' | ||
+ | $html = mb_convert_encoding($html, ' | ||
+ | preg_match_all('/ | ||
+ | $html = $matchs[' | ||
+ | $json = json_encode($matchs[' | ||
+ | //$json = json_decode($matchs[' | ||
//$usdjpy = json_decode($json, | //$usdjpy = json_decode($json, | ||
- | $usdjpy = json_decode($json, | + | echo '< |
- | $cnhjpy = json_decode($json, | + | echo 'var quotes = ' . $json . ';'; |
+ | echo '</ | ||
+ | $usdjpy = []; //json_decode($json, | ||
+ | $cnhjpy = []; //json_decode($json, | ||
+ | // | ||
+ | // | ||
+ | // | ||
// | // | ||
行 156: | 行 240: | ||
| [[currency|通貨関連]] | | [[currency|通貨関連]] | ||
- | < | ||
- | < | ||
- | "use strict"; | ||
- | let tomoyan_net_app; | ||
- | let ua_parser; | ||
- | require([' | ||
- | tomoyan_net_app = new Vue({ | ||
- | el: '# | ||
- | data: { | ||
- | remote_addr: | ||
- | cpu_cores: '', | ||
- | display_resolution: | ||
- | browser_resolution: | ||
- | user_agent: navigator.userAgent, | ||
- | ua_parser: '', | ||
- | versions: '', | ||
- | }, | ||
- | created: function() { | ||
- | this.get_display_resolution(); | ||
- | this.get_cpu_cores() | ||
- | | ||
- | window.UAParser = UAParser; | ||
- | let ua_result = ua_parser = new UAParser(); | ||
- | let ua_json = ua_result.getResult(); | ||
- | this.ua_parser = JSON.stringify(ua_json, | ||
- | | ||
- | this.versions = ' | ||
- | ' | ||
- | }, | ||
- | computed: { | ||
- | ip_ver: function() { | ||
- | return this.remote_addr.indexOf(':' | ||
- | }, | ||
- | dark_mode: function() { | ||
- | if (matchMedia(' | ||
- | return ' | ||
- | } | ||
- | else { | ||
- | return matchMedia(' | ||
- | } | ||
- | }, | ||
- | }, | ||
- | methods: { | ||
- | get_display_resolution: | ||
- | this.display_resolution = screen.width + ' x ' + screen.height; | ||
- | this.browser_resolution = window.innerWidth + ' x ' + window.innerHeight; | ||
- | }, | ||
- | get_cpu_cores: | ||
- | this.cpu_cores = (!!navigator.hardwareConcurrency ? | ||
- | | ||
- | '' | ||
- | }, | ||
- | window: | ||
- | let diffLoadTime = Date.now() - startTime; | ||
- | console.log(' | ||
- | }, | ||
- | / | ||
- | let diffReadyTime = Date.now() - startTime; | ||
- | console.log(' | ||
- | },*/ | ||
- | }, | ||
- | mounted: function() { | ||
- | window.addEventListener(' | ||
- | }, | ||
- | beforeDestroy: | ||
- | window.removeEventListener(' | ||
- | }, | ||
- | }); | ||
- | }); | ||
- | </ | ||
- | </ | ||
\\ | \\ | ||
このサイトを広告なしで見るには...\\ | このサイトを広告なしで見るには...\\ |