-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwebmaster_js_automater
More file actions
29 lines (24 loc) · 1.04 KB
/
webmaster_js_automater
File metadata and controls
29 lines (24 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
var urls = prompt("Please enter the keywords");
if (urls!=""){
list_of_urls=urls.split(":")
for (i=0;i<(list_of_urls.length);i++){
localStorage.setItem("urls"+i,list_of_urls[i]);
localStorage.setItem('url_index',0);
}
}
for (i = 0; i < cars.length; i++) {
text += cars[i] + "<br>";
}
get_keys_index=parseInt(localStorage.getItem("url_index"))?parseInt(localStorage.getItem("url_index")):0;
url_key="urls"+get_keys_index;
get_url=localStorage.getItem(url_key);
localStorage.setItem('url_index',++get_keys_index);
document.getElementsByName('urlnt')[0].value=get_url;
external_fetch_location="https://www.google.com/webmasters/tools/submit-url";
bing_base="http://www.bing.com/toolbox/submit-site-url?url=";
if(window.location==external_fetch_location){
external_url=bing_base+get_url;
document.getElementsByClassName("goog-inline-block product-name-logo")[0].setAttribute("href",external_url);
document.getElementsByClassName("goog-inline-block product-name-logo")[0].setAttribute("target","_blank");
};
document.getElementById('path-input').value=get_url;