Discuz! Board

 找回密碼
 立即註冊
搜索
熱搜: 活動 交友 discuz
查看: 1|回復: 0

Use BIM technology to get in projects

[複製鏈接]

1

主題

1

帖子

5

積分

新手上路

Rank: 1

積分
5
發表於 2023-11-18 13:16:59 | 顯示全部樓層 |閱讀模式
I want to see notes on every device. The only way to do this is to store notes on the server , and teach the plugin to recognize the user. While on the VKontakte page , the user is already authorized ; it is enough to find out who exactly. For this, the VKMemos plugin uses the VKontakte API library. Authorization in the plugin is tied to VKontakte authorization. To use the VKontakte API, you need to create an application . Each application receives a secret key. When the plugin is launched for the first time, the user receives a VKontakte pop up window asking for permission. The user only needs to give consent without entering any data. At the same time, in the browser, the VKontakte library generates a hash code based on the user data and the application s secret key. Each request to the server is signed with this hash code.

The server checks requests for authenticity by recreating the hash code on its photo editing servies side and comparing it with the received one. To fake the code, you need to know the user data and the secret key , known only to the application developer. Data synchronization Notes are stored on the server and linked to the VKontakte user. To speed up the work of the plugin, when launched, it downloads all notes and later displays them not from the server , but locally. Notes are always saved to the server. If you have multiple tabs open , changing notes in one of them will save them to the server , but will not update notes from the server in other tabs. To synchronize the work of several tabs , notes are stored not in a local variable , but in the local storage common to the browser localstorage.



Changing a note in one tab triggers an event that other tabs receive , updating the note. However, the local storage change event does not work on VKontakte pages. During the study , it turned out that VKontakte intercepts these events for internal work. The local storage change event, according to the standard, is triggered in all other tabs except the one in which it was called. Apparently , VKontakte needed to receive this event in the original tab. To do this, they created a special iframe with an event interceptor and exchanged data through Message events. Two solutions were found replace their subscription with a copy with your own code added , or subscribe to the Message event.

回復

使用道具 舉報

您需要登錄後才可以回帖 登錄 | 立即註冊

本版積分規則

Archiver|手機版|自動贊助|z

GMT+8, 2025-2-23 19:02 , Processed in 0.037252 second(s), 18 queries .

抗攻擊 by GameHost X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回復 返回頂部 返回列表
一粒米 | 中興米 | 論壇美工 | 設計 抗ddos | 天堂私服 | ddos | ddos | 防ddos | 防禦ddos | 防ddos主機 | 天堂美工 | 設計 防ddos主機 | 抗ddos主機 | 抗ddos | 抗ddos主機 | 抗攻擊論壇 | 天堂自動贊助 | 免費論壇 | 天堂私服 | 天堂123 | 台南清潔 | 天堂 | 天堂私服 | 免費論壇申請 | 抗ddos | 虛擬主機 | 實體主機 | vps | 網域註冊 | 抗攻擊遊戲主機 | ddos |