{"id":23123150,"url":"https://github.com/restlessdesign/revere","last_synced_at":"2025-04-04T04:22:51.633Z","repository":{"id":5557936,"uuid":"6762667","full_name":"restlessdesign/revere","owner":"restlessdesign","description":"Adds additional logic to Tumblr’s share bookmarklet to center the pop-up window within your browser","archived":false,"fork":false,"pushed_at":"2016-08-26T16:02:08.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-09T15:43:33.378Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/restlessdesign.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-11-19T15:40:21.000Z","updated_at":"2016-08-26T16:02:09.000Z","dependencies_parsed_at":"2022-07-07T02:01:45.972Z","dependency_job_id":null,"html_url":"https://github.com/restlessdesign/revere","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/restlessdesign%2Frevere","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/restlessdesign%2Frevere/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/restlessdesign%2Frevere/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/restlessdesign%2Frevere/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/restlessdesign","download_url":"https://codeload.github.com/restlessdesign/revere/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247119277,"owners_count":20886721,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-17T07:32:51.293Z","updated_at":"2025-04-04T04:22:51.613Z","avatar_url":"https://github.com/restlessdesign.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Revere\n\nAn improved Tumblr bookmarklet which positions the pop-up based on the position of your browser window, centering it by default.\n\n## Installation\n\nUpdate the URL of your bookmarklet to the following:\n\n```javascript\njavascript:var win=window,doc=document,bod=doc.body,getWindowSelection=win.getSelection,getDocumentSelection=doc.getSelection,document_selection=doc.selection,selection=getWindowSelection?getWindowSelection():getDocumentSelection?getDocumentSelection():document_selection?document_selection.createRange().text:0,share_url=\"http://www.tumblr.com/share\",loc=doc.location,encode=encodeURIComponent,share_params=\"?v=3\u0026u=\"+encode(loc.href)+\"\u0026t=\"+encode(doc.title)+\"\u0026s=\"+encode(selection),url=share_url+share_params,share_width=\n450,share_height=430;\ntry{if(!/^(.*\\.)?tumblr[^.]*$/.test(loc.host))throw 0;tstbklt()}catch(err){var calculatePosition=function(b){var a={x:0,y:0};a.x=win.screenLeft||win.screenX;a.y=win.screenTop||win.screenY;b?(a.x+=bod.clientWidth/2-share_width/2,a.y+=win.innerHeight/2-share_height/2):(a.x+=10,a.y+=110);return a},openShareWindow=function(){var b=calculatePosition(!0);win.open(url,\"t\",\"toolbar=0,resizable=0,status=1,width=\"+share_width+\",height=\"+share_height+\",left=\"+b.x+\",top=\"+b.y)||(loc.href=url)};/Firefox/.test(navigator.userAgent)?\nsetTimeout(openShareWindow,0):openShareWindow()}void 0;\n```\n\n## Customization\n\nBy default, the new share window will appear centered within your current browser window.\nYou can set it to open near the top-left corner of the browser window by changing this line of code:\n\n```javascript\nvar position = calculatePosition(true);\n```\n\nto this:\n\n```javascript\nvar position = calculatePosition();\n```\n\n…or simply copy and paste the following:\n\n```javascript\njavascript:var win=window,doc=document,bod=doc.body,getWindowSelection=win.getSelection,getDocumentSelection=doc.getSelection,document_selection=doc.selection,selection=getWindowSelection?getWindowSelection():getDocumentSelection?getDocumentSelection():document_selection?document_selection.createRange().text:0,share_url=\"http://www.tumblr.com/share\",loc=doc.location,encode=encodeURIComponent,share_params=\"?v=3\u0026u=\"+encode(loc.href)+\"\u0026t=\"+encode(doc.title)+\"\u0026s=\"+encode(selection),url=share_url+share_params,share_width=\n450,share_height=430;\ntry{if(!/^(.*\\.)?tumblr[^.]*$/.test(loc.host))throw 0;tstbklt()}catch(err){var calculatePosition=function(b){var a={x:0,y:0};a.x=win.screenLeft||win.screenX;a.y=win.screenTop||win.screenY;b?(a.x+=bod.clientWidth/2-share_width/2,a.y+=win.innerHeight/2-share_height/2):(a.x+=10,a.y+=110);return a},openShareWindow=function(){var b=calculatePosition();win.open(url,\"t\",\"toolbar=0,resizable=0,status=1,width=\"+share_width+\",height=\"+share_height+\",left=\"+b.x+\",top=\"+b.y)||(loc.href=url)};/Firefox/.test(navigator.userAgent)?\nsetTimeout(openShareWindow,0):openShareWindow()}void 0;\n```\n\nInside of `calculatePosition()`, you can further edit the offsets to your liking.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frestlessdesign%2Frevere","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frestlessdesign%2Frevere","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frestlessdesign%2Frevere/lists"}